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

来源:互联网 发布:淘宝网页 编辑:程序博客网 时间:2024/06/06 02:44

 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

0 0
原创粉丝点击