* Fixed typo in tutorial(Routing) The path to `app.component.css` should start from current directory, not 'app/', since the file is already in 'app/' * docs: fixed path error in the tutorial (HTTP) same problem fixed as commit 917e0ce1c2829224e3ee53a069599fccbc5751a3 * docs: Added moduleId for styleUrls referencing in these two classes
24 lines
560 B
TypeScript
24 lines
560 B
TypeScript
// #docregion
|
|
import { Component } from '@angular/core';
|
|
|
|
@Component({
|
|
moduleId: module.id,
|
|
selector: 'my-app',
|
|
// #docregion template
|
|
template: `
|
|
<h1>{{title}}</h1>
|
|
<nav>
|
|
<a routerLink="/dashboard" routerLinkActive="active">Dashboard</a>
|
|
<a routerLink="/heroes" routerLinkActive="active">Heroes</a>
|
|
</nav>
|
|
<router-outlet></router-outlet>
|
|
`,
|
|
// #enddocregion template
|
|
// #docregion styleUrls
|
|
styleUrls: ['app.component.css'],
|
|
// #enddocregion styleUrls
|
|
})
|
|
export class AppComponent {
|
|
title = 'Tour of Heroes';
|
|
}
|