Routing allows navigation between different views or components in a single-page application (SPA).
const routes: Routes = [
{ path: 'home', component: HomeComponent },
{ path: 'about', component: AboutComponent }
];
imports: [RouterModule.forRoot(routes)]
Home this.router.navigate(['/home']);
Take quizzes related to this topic and see where you stand!
Start Quiz Now