Closed anabelle closed 10 years ago
Hi, you can do this by giving the same id to each route/modal so that they would open in the same modal (and not stack modals one on each other):
$stateProvider.state('login', {
url: "/login",
onEnter: ['$ocModal', function($ocModal) {
$ocModal.open({
id: "idModal",
url: "/partials/login.html",
controller: 'LoginCtrl'
});
}]
});
$stateProvider.state('view', {
url: "/view",
onEnter: ['$ocModal', function($ocModal) {
$ocModal.open({
id: "idModal",
url: "/partials/view.html",
controller: 'ViewCtrl'
});
}]
});
Hi,
What would be your recommended approach so that each modal has a unique URL and works together with browser history?