October 2017
Intermediate to advanced
280 pages
6h 50m
English
We have the declarations of the routes and all the components associated with them. The only thing left is to define the template of the root App component in order to link everything together.
Add the following content to the template property inside the @Component decorator in ch7/step-0/app.ts:
@Component({
//...
template: `
<nav class="navbar navbar-default">
<ul class="nav navbar-nav">
<li><a [routerLink]="['home']">Home</a></li>
<li><a [routerLink]="['dev-add']">Add developer</a></li>
</ul>
</nav>
<router-outlet></router-outlet>
`,
//...
})
In the template, there are two Angular-specific directives:
Read now
Unlock full access