When using angular 1.2 instead of 1.07 the following piece of code is not valid anymore, why?(当使用角度1.2而不是1.07时,下面的代码不再有效,为什么?)
'use strict';
var app = angular.module('myapp', []);
app.config(['$routeProvider', '$locationProvider',
function($routeProvider, $locationProvider) {
$locationProvider.html5Mode(true);
$routeProvider.
when('/', {
templateUrl: 'part.html',
controller: 'MyCtrl'
}).
otherwise({
redirectTo: '/'
});
}
]);
the issue is in the injector configuration part (app.config):(问题出在注入器配置部分(app.config):)
Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.2.0rc1/$injector/modulerr?p0=muninn&p1=Error%…eapis.com%2Fajax%2Flibs%2Fangularjs%2F1.2.0rc1%2Fangular.min.js%3A31%3A252)
If I remember correctly this issue started with angular 1.1.6.(如果我没记错的话,这个问题始于angular 1.1.6。)
ask by Dawid translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…