THIS PROJECT IS NO LONGER MAINTAINED -- Extras for UI-Router for AngularJS. Sticky States (a.k.a. parallel states), Deep State Redirect (for tab-like navigation), Future States (async state definition)
I prefer your architecture, but on the other hand, I much prefer the ui-router-uib-modal simplicity of
modal : true,
with a state rather than having to include all this:
function showModal($modal, $previousState) {
$previousState.memo("modalInvoker"); // remember the previous state with memoName "modalInvoker"
$modal.open({
templateUrl: 'modal1.html',
backdrop: 'static',
controller: function($modalInstance, $scope) {
var isopen = true;
$modalInstance.result.finally(function() {
isopen = false;
$previousState.go("modalInvoker"); // return to previous state
});
$scope.close = function () {
$modalInstance.dismiss('close');
};
$scope.$on("$stateChangeStart", function(evt, toState) {
if (!toState.$$state().includes['modal1']) {
$modalInstance.dismiss('close');
}
});
}
})
}
});
I prefer your architecture, but on the other hand, I much prefer the ui-router-uib-modal simplicity of
modal : true,
with a state rather than having to include all this: