demo.html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>AngularJS</title>
<script src="angular.min.js"></script> <!-- 引入AngularJS框架 -->
</head>
<body ng-app="App">
<div ng-controller="DemoController">
<ul>
<li ng-repeat="item in myArr" ng-switch on="item"> <!-- ng-switch on判断项(on可以省略) 。ng-repeat遍历数组 -->
<span ng-switch-when="bb">{{item}}</span> <!-- 当item=='bb'时,span标签显示 -->
</li>
</ul>
</div>
<script>
var App = angular.module('App',[]);
App.controller("DemoController",['$scope',function($scope) {
$scope.myArr = ['aa','bb','cc'];
}]);
</script>
</body>
</html>