Complete the code to import the Angular routing module.
import { [1] } from '@angular/router';
The RouterModule is the Angular module that enables routing in Single Page Applications.
Complete the code to define a route path for the HomeComponent.
const routes = [{ path: '', component: [1] }];The empty path ('') usually points to the HomeComponent as the default page in SPAs.
Fix the error in the routing import to enable routing in the app module.
@NgModule({ imports: [[1].forRoot(routes)] })The RouterModule.forRoot(routes) method sets up the router with the route definitions.
Fill both blanks to create a link that navigates to the About page.
<a [1]="/about">About</a> <[2]></[2]>
The routerLink directive creates navigation links, and router-outlet is the placeholder where routed components display.
Fill all three blanks to define routes for Home, About, and Contact components.
const routes = [
{ path: '', component: [1] },
{ path: 'about', component: [2] },
{ path: 'contact', component: [3] }
];Each route path should map to its respective component: Home, About, and Contact.