【发布时间】:2017-04-24 14:58:43
【问题描述】:
我是使用 angularJs 的新手。我正在关注这篇文章asp.net-angularjs 然后我遇到了这样的问题:
entryCtrl.js
(function (app) {
'use strict';
app.controller('entryCtrl', entryCtrl);
entryCtrl.$inject = ['$scope'];
function entryCtrl($scope) {
$scope.pageClass = 'page-entry';
}
})(angular.module('model'));
app.js
(function () {
'use strict';
angular.module('model', ['common.core', 'common.ui'])
.config(config)
.run(run);
config.$inject = ['$routeProvider'];
function config($routeProvider) {
$routeProvider
.when("/", {
templateUrl: "scripts/spa/home/index.html",
controller: "indexCtrl"
})
.when("/entry", {
templateUrl: "scripts/spa/entry/entry.html",
controller: "entryCtrl"
});
}
然后出现[ng:areq] Argument 'entryCtrl' is not a function, got undefined angular.js:11707之类的错误
但在 indexCtrl.js 中没有错误。 indexCtrl hv 与此相同。我想念什么?
【问题讨论】:
-
什么是角度版本
-
就像我在那篇文章中使用的那样。我使用所有捆绑供应商
-
可能你没有把它们排好
-
@Sajeetharan 我不知道你是什么意思。对不起
-
请给我一些样品:(
标签: asp.net angularjs asp.net-mvc wcf-rest