错误:ng:areq错误参数payableCtrl不是函数,未定义

时间:2018-07-28 08:25:16

标签: angularjs

将一个控制器调用到另一个控制器AngularJS

我有打开模态并调用另一个控制器的代码。

列表控制器

$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) {

  }]);

浏览器的控制台屏幕上显示错误。

enter image description here

这样做的主要目的是,我想将一些数据传递到模式屏幕。

0 个答案:

没有答案