Hello,
I have angular application with implemented logging. When user is logged in
and wants to open app in new (second) tab following piece of code handle
this situation (actually it runs on every state change but case I'm talking
about is connected only with opening new tab by logged in user):
$rootScope.$on("$stateChangeStart", function (event, toState, toParams,
fromState, fromParams) {
if (Auth.signedIn()) {
if (toState.url === '/login') {
event.preventDefault();
//$state.go('start');
$state.go("users", {}, {
reload: true
});
}
} else {
if (toState.url !== '/login') {
event.preventDefault();
$state.go('login');
}
}
});
In my app I got simple structure - index.html renders the static stuff like
Top/Sidebar. Inside I have <div ng-view></div> to show the partial html
files like for example users.html.
After opening new tab only users.html is displayed - all stuff from
index.html is omitted.
Does any one knows how can I make it render whole content of index.html not
only view?
Thank you in advance for help.
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.