0
我想用modalInstance
。 我有以下几点:参数'formErrorLogController'不是一个函数,得到undefined
$scope.openClaimLogError = function (deni_arr) {
$scope.data = {
deni_arr : deni_arr
};
modalInstance = $modal.open({
templateUrl: 'app/shared/templates/formErrorLog.html',
controller: 'formErrorLogController',
resolve: {
data: function() {
return $scope.data.deni_arr;
}
}
});
}`
This code is in Controller1.js
And in Controller2.js I have the following:
`'use strict';
app.controller('formErrorLogController',
function ($scope, $cookies, claimsService, $modal, $filter, data) {}`
究竟我试图做的是将数据发送到第二控制器,所以我可以打印出来。
为什么我会收到类似这样的错误:Error: [ng:areq] Argument 'formErrorLogController' is not a function, got undefined
你可能没有包含脚本参考 – Aravind
@Aravind,我应该在哪里做? 多一点解释:我有一个form_page.html和formErrorLog.html.html(如上),在form_page.html的控制器(controller1.js)我有一个未完成字段的数组,我想传递给formErrorLog.html的控制器(controller2.js)将出现在模式上。 –
@FineasSilaghi in index.html? – tanmay