1 angularjs 使用 ngRoute 路由插件
<html>
<head>
<meta charset="utf-8">
<title>AngularJS 路由实例 - 菜鸟教程</title>
</head>
<body ng-app="testdemo">
<ul>
<li><a href="#/">aaa</a></li>
<li><a href="#/bbb">bbb</a></li>
<li><a href="#/ccc">ccc</a></li>
</ul>
<div ng-view></div>
<script src="https://cdn.bootcss.com/angular.js/1.4.6/angular.min.js"></script>
<script src="https://apps.bdimg.com/libs/angular-route/1.3.13/angular-route.js"></script>
<script>
angular.module("testdemo",['ngRoute'])
.config(['$routeProvider',function($routeProvider){
$routeProvider.when("/",{template:"abc"})
.when("/bbb",{template:"bbb"})
.otherwise({template:"ccc"});
}]);
</script>
</body>
</html>