May 2018
Intermediate to advanced
512 pages
11h 3m
English
AppComponent is considered a root element for the root router defined in app-routing.module, which allows us to define outlets within this root element to dynamically load any content we wish using the <router-outlet> element:
src/app/app.component.ts... template: ` <mat-toolbar color="primary"> <a mat-button routerLink="/home"><h1>LemonMart</h1></a> </mat-toolbar> <router-outlet></router-outlet> `,
Now, the contents of home will render inside <router-outlet>.
Read now
Unlock full access