Rumah > Soal Jawab > teks badan
就是定义了两个function 结果刚好要互相调用,我也没想到别的办法,就直接写了。然后显示的错误就是其中一个函数是未定义的。我还是直接上代码吧!
function verify () { $uibModal.open({ animation: $scope.animationsEnabled, templateUrl: 'app/views/verify.html', controller: function ($rootScope, $uibModalInstance) { $rootScope.logIn = function () { $uibModalInstance.dismiss(); return logLn(); } } }); }; /*登录弹出的模态框*/ function logIn () { $uibModal.open({ animation: $scope.animationsEnabled, templateUrl: 'app/views/login.html', controller: function ($rootScope, $log, $uibModalInstance) { $rootScope.verify = function () { $uibModalInstance.dismiss(); return verify() }; } }); };