视图之间的切换的路由,为什么出不来结果
index.html
<!doctype html>
<html ng-app="bookStoreApp">
<head>
<meta charset="utf-8">
<meta http-equiv="Cache-Control" content="no-transform">
<title>angular</title>
<meta name="keywords" content="关键字1,关键字2">
<meta name="description" content="描述">
<script src="js/angular-1.4.6.js"></script>
<script src="js/angular-route1.3.13.js"></script>
<script src="js/app.js"></script>
<script src="js/controller.js"></script>
</head>
<body>
<div ng-view></div>
</body>
</html>
hello.html
<p>{{greeting.text}},Angular</p>
bookList.html
<ul>
<li ng-repeat="book in books">书名:{{book.title}} 作者:{{book.author}}</li>
</ul>
app.js
var bookStoreApp=angular.module('bookStoreApp',['ngRout','ngAnimate','bookStoreCtrls','bookStoreFilters'])
bookStoreApp.config(function($routeProvider){
$routeProvider.when('/hello',{
templateUrl:'tpls/hello.html',
controller:'HelloCtrl'
}).when('/list',{
templateUrl:'tpls/bookList.html',
controller:'BookListCtrl'
}).otherwise({
redirectTo:'/hello'
});
});
conctroller.js
var bookStoreCtrls=angular.module('bookStoreCtrl',[]);
bookStoreCtrls.controller('HelloCtrl',['$scope',function HelloCtrl($scope){
$scope.greeting={
text:'hello'
}
}]);
bookStoreCtrl.controller('BookListCtrl',['$scope',function BookListCtrl($scope){
$scope.books=[
{title="《江湖》",anthor:"大漠穷秋"},
{title="《设计》",author:"大漠穷秋"}
]}
]);
运行结果是空白,为什么,求解