Guide on Angular 6 (2018).pdf
Pro.Angular.6.3rd.Edition.pdf
- The main.ts file is the startup component that bootstraps the app, using the root component from the specified
NgModule
.
- Base main.ts Sample
NgModules
are classes decorated with @NgModule
.
- The
@NgModule
decorator’s imports array tells Angular what other NgModules
the current module needs.
- Classes with an
@NgModule
decorator are by convention kept in their own files, but what makes them a NgModule
isn’t being in their own file. Rather, it’s the presence of @NgModule and its metadata.
- App Module Sample
- Routing supports static, parameterized, redirect, and wildcard routes.
- Also supports custom route data and resolve.
- Define Routes
- Guards
<router-outlet>
routerLink
- Routing From Code
Class Decorators