<!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