【发布时间】:2015-10-10 12:31:51
【问题描述】:
我正在使用 Angular v1.4.2,并且不断收到“Error: [ng:areq] Argument 'accountRegisterCtrl' is not a function, got undefined”下面是我的控制器定义
(function(app) {
'use strict';
function accountRegisterCtrl($scope, $window) {
//........
$scope.previous = function () {
$window.history.back();
}
}
app.controller('accountRegisterCtrl', ['$scope', '$window', accountRegisterCtrl]);
}(angular.module('accountRegister')));
任何机构都可以提供帮助!
【问题讨论】:
-
只需使用内联函数,您就可以解决问题。
标签: angularjs