加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

AngularJS的学习--ng-show/ng-hide/ng-if和ng-switch

发布时间:2020-12-17 10:02:26 所属栏目:安全 来源:网络整理
导读:angularJS在模板里判断属性后显示相应html怎么写? { !doctype htmlhtml ng-apphead meta charset="UTF-8" title/title link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.2/css/bootstrap.min.css" script src="htt
angularJS在模板里判断属性后显示相应html怎么写?
{
<!doctype html>
<html ng-app>
<head>
    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.2/css/bootstrap.min.css">
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0rc1/angular.min.js"></script>
    <script type="text/javascript">
        var DemoCtrl = function($scope){           
            $scope.ShowMode = "list";
 
            $scope.ChangeShow = function(ShowMode){
                $scope.ShowMode = ShowMode;
            }
        };
    </script>
</head>
<body ng-controller="DemoCtrl" ng-switch="ShowMode">

以上是摘要
博客已搬家地址:AngularJS的学习--ng-show/ng-hide/ng-if和ng-switch

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读