Submodule 21.1: Routing - Practice
Update the app.component.html
Next update the app.component.html file as follows:
<router-outlet></router-outlet>
<app-footer></app-footer>
Here we don't need any more the "link" to the app-menu since the "linking" will take place using the router.Â
Although our application now has a routing configuration, we still need to tell Angular Router where it can place the instantiated components in the DOM.
When our application is bootstrapped, Angular instantiates AppComponent because AppComponent is listed in the bootstrap property of AppModule.
To tell Angular Router where it can place components, we must add the <router-outlet></router-outlet>
element to AppComponent’s HTML template.