Complete the code to define a basic routes array with a path and component.
const routes: Routes = [ { path: 'home', component: [1] } ];The routes array requires a component to display for the given path. Here, HomeComponent is the correct component to use.
Complete the code to import the Routes type from Angular router.
import { [1] } from '@angular/router';
The Routes type is imported from '@angular/router' to define the routes array.
Fix the error in the routes array by completing the path property correctly.
const routes: Routes = [ { path: [1], component: AboutComponent } ];The path value must be a string literal in quotes. Using single quotes like 'about' is correct.
Fill both blanks to define a route with an empty path and redirect to 'home'.
const routes: Routes = [ { path: [1], redirectTo: [2], pathMatch: 'full' } ];An empty string '' is used for the default path, and 'home' is the redirect target.
Fill all three blanks to define a route with path 'profile', component ProfileComponent, and a data property with title 'User Profile'.
const routes: Routes = [ { path: [1], component: [2], data: { title: [3] } } ];The path is 'profile', the component is ProfileComponent, and the data title is 'User Profile'.