0
我有一个代码,在路由这样关闭,打开特定的模式在页面加载角UI引导
.state('resetPassword', {
url: '/home/reset_password',
templateUrl: 'home/home.html',
controller: 'HomeController',
controllerAs: 'vm',
data: {
requireLogin: false /* This is what tells it to require authentication */
},
onEnter: function($state, $uibModal) {
var mymodal=$uibModal.open({
backdrop: true,
templateUrl: 'login/resetpassword.html',
}).result.finally(function() {
$state.go('home');
})
}
})
和关闭按钮标记
<div class="reset_section" ng-style="reset">
<span class="modal_close" ng-click="modalClose()">
<i class="material-icons">close</i>
这将打开页面加载模态,但问题是,我无法通过调用函数modalClose()来关闭模式,它显示$uibModalInstance is not defined
并且我还需要在同一页面中再打开一个模式。重置密码后,有一个按钮登录,点击登录按钮后,需要打开登录弹出窗口,并且必须关闭重置密码弹出窗口。如何操作,任何人都可以请帮我