我有打开模态并调用另一个控制器的代码。
列表控制器
$scope.addPayable = function (booking) {
var modalInstance = $uibModal.open({
templateUrl: 'views/pages/dashboard/reports/payables.modal.html',
controller: 'payableCtrl',
resolve: {
data: function () {
return {
amount: "123"
};
}
}
});
};
这是我的第二位控制器
付费控制器
'use strict';
angular.module('AniTheme')
.controller('payableCtrl', ['$scope', '$data', 'uibModalInstance', function ($scope, data, $uibModalInstance) {
}]);
浏览器的控制台屏幕上显示错误。
这样做的主要目的是,我想将一些数据传递到模式屏幕。