This is a basic and client side only example !
You can see this example working at https://igor-lopes.github.io/angular-route-protection/
In order to authenticate and test routes authorization, you must enter the credentials:
| Email | Password | |----------|:-------------:|------:| | [email protected] | 1234 |
User credentials are stored in a JSON object in the AuthService
.
You can check your browser console for the app route changes and authentication status.