Routing

All the client side routes are defined in clientapp outing.module.ts. Our default page is HomeComponent. Apart from home, we have the following routes: about, create-thread, view-thread, edit-thread, register, login, logout, account, admin, and notfound. If the route we are navigating to is not listed above, we redirect the user to notfound route. As we can see from this file, all routes mention the component that gets invoked when this route is active.

Apart from that, we have a canActivate attribute, which defines an AuthGuardLogin or AuthGuardAdmin service. This service is responsible for not letting in the not logged in users access that route.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.157.34