Javascript “如何修复”;错误:[ng:areq]参数';SomeCtrl';不是函数,未定义;仅在AngularJS中的Microsoft Edge中出现问题?

Javascript “如何修复”;错误:[ng:areq]参数';SomeCtrl';不是函数,未定义;仅在AngularJS中的Microsoft Edge中出现问题?,javascript,angularjs,microsoft-edge,Javascript,Angularjs,Microsoft Edge,我正在使用AngularJS应用程序。 我正在使用服务加载我的控制器,如下所示 showDialog: function (data) { return $mdDialog.show({ controller: 'TestCtrl', templateUrl: 'path_to_the_template/test.html', clickOutsideToClose: true, locals: {

我正在使用AngularJS应用程序。 我正在使用服务加载我的控制器,如下所示

showDialog: function (data) {
    return $mdDialog.show({
        controller: 'TestCtrl',
        templateUrl: 'path_to_the_template/test.html',
        clickOutsideToClose: true,
        locals: {
            data: data
        }
    });
}
(function () {
    'use strict';
    angular.module("test").controller("TestCtrl", [
        '$scope', 'myService', 'data', TestCtrl]);

    function TestCtrl($scope, myService, data) {
        // My controller functions goes here
    }
})();
TestCtrl.js如下所示

showDialog: function (data) {
    return $mdDialog.show({
        controller: 'TestCtrl',
        templateUrl: 'path_to_the_template/test.html',
        clickOutsideToClose: true,
        locals: {
            data: data
        }
    });
}
(function () {
    'use strict';
    angular.module("test").controller("TestCtrl", [
        '$scope', 'myService', 'data', TestCtrl]);

    function TestCtrl($scope, myService, data) {
        // My controller functions goes here
    }
})();
这在Chrome和Firefox中运行得非常好但当我在Microsoft Edge中测试我的应用程序时,它给出了以下错误。

Error: [ng:areq] Argument 'TestCtrl' is not a function, got undefined
http://errors.angularjs.org/1.5.9/ng/areq?p0=TestCtrl&p1=not%20a%20function%2C%20got%20undefined
   at assertArg (http://192.168.8.201:1337/vendor/angular/angular.js:1937:5)
   at assertArgFn (http://192.168.8.201:1337/vendor/angular/angular.js:1947:3)
   at $controller (http://192.168.8.201:1337/vendor/angular/angular.js:10495:9)
   at link (http://192.168.8.201:1337/vendor/angular-material/angular-material.js:2093:13)
   at linkElement (http://192.168.8.201:1337/vendor/angular-material/angular-material.js:3426:11)
   at Anonymous function (http://192.168.8.201:1337/vendor/angular-material/angular-material.js:3300:17)
   at processQueue (http://192.168.8.201:1337/vendor/angular/angular.js:16606:11)
   at Anonymous function (http://192.168.8.201:1337/vendor/angular/angular.js:16622:27)
   at Scope.prototype.$eval (http://192.168.8.201:1337/vendor/angular/angular.js:17913:9)
   at Scope.prototype.$digest (http://192.168.8.201:1337/vendor/angular/angular.js:17727:15) undefined

尝试检查此线程可能会对该问题有所了解。尝试检查此线程可能会对该问题有所了解。