Angular 7: A template to be up to speed in no time
Today, I'll share with you an Angular 7 application from where you can start building your own. I've followed as much as possible the best practices available here .   You can find the source code at this repository .   If you can improve this solution, do not hesitate to tell me.  😀     Let's inspect the different parts:    Core Module    1. guards   I've incorporated basically 2 guards:       The AuthGuard  implements both CanActivate  and CanLoad . This guard is responsible for checking if the current user is authenticated and authorized. If not authenticated, the user will be redirected to the login page. If the authenticated user hasn't sufficient permission, he will be redirected to the home page.  The NoAuthGuard  which implements CanActivate , provides a way to restrict a route when a user is already logged in (e.g. login).    2. interceptors     The ErrorInterceptor  basically intercepts client errors and server side errors. When it catches a 401  or 403  ...
