angularjs“Uncaught Error:[$ injector:modulerr]”

时间:2014-09-09 00:21:37

标签: angularjs ngroute angularjs-ng-route

我查了一下 AngularJS 1.2 $injector:modulerr但它没有解决我的问题

你可以在这里找到我的例子

http://jsbin.com/ziroq/1/edit?html,js,console

<html ng-app="app">

<head></head>

<body>
    <h1>example 8</h1> 
    <p>Changing views with routes and $routeProvider</p>
    <p>you need angular-routes.min.js file to use $routeProvider</p>

    <div ng-view></div>


    <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
    <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular-route.min.js"></script>

<script>
  var app = angular.module('app', ['ngRoute']);

app.config(function ($routeProvider) {
            $routeProvider.when('list', {
                controller: MyController,
                templateUrl: '/example-08-list.html'
            });
 });

  </script>  

</body>

</html>

0 个答案:

没有答案