Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to open up angular routes to not logged in users #82

Open
Veske opened this issue Jan 4, 2016 · 1 comment
Open

How to open up angular routes to not logged in users #82

Veske opened this issue Jan 4, 2016 · 1 comment

Comments

@Veske
Copy link

Veske commented Jan 4, 2016

Right now the state is that whenever I try to access any other angular route, i will be redirected to the log in adress i have specified. My server redirects all html requests to index.

But how do I open up specific angular routes to be available for all users?

@Sergezdv
Copy link

I know that its bed way but for now i add this:
$scope.$on('$locationChangeStart', function(event, next, current) { var parser; parser = document.createElement('a'); parser.href = next; if (parser.pathname === '/users/login') { return event.preventDefault(); } });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants