I want to navigate to the route which has abstract:true. The problem is that there is only one case where it should be false, and it's when there is 'setFalse' available in the sessionStorage which I set in the controller.
Here is the logic:
.state("main.auth", {
url: "/auth?client_key&jira_token&user",
params: {
...
},
abstract: true,
controller: "AuthCtrl as auth",
templateProvider: function($templateCache) {
return $templateCache.get('/templates/auth/auth.html');
},
data: {}
})
// in controller
window.sessionStorage.setItem('setFalse', 'true');
$window.location = $state.go("main.auth", params);
How can be it achieved?