就是定义了两个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()
};
}
});
};
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
你是不是第一个方法中的
return logLn();单词写错了logIn谢邀,我来得太晚了。
一般undefined报错确认几个事情,拼写、确认调用时已被定义。
不好意思 ,太对不起大家了 太大意了 已解决。就是拼写错误。我决定去冷静冷静了。