2015-12-10 12:40:54 -05:00
|
|
|
/* First version */
|
|
|
|
// #docregion
|
2016-04-27 14:28:22 -04:00
|
|
|
import { Component } from '@angular/core';
|
2015-12-10 12:40:54 -05:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'my-app',
|
2016-06-09 14:00:26 -04:00
|
|
|
// #docregion template
|
2015-12-10 12:40:54 -05:00
|
|
|
template: `
|
2016-08-27 00:19:27 -04:00
|
|
|
<h1>Angular Router</h1>
|
2015-12-31 19:55:53 -05:00
|
|
|
<nav>
|
2016-07-16 18:34:26 -04:00
|
|
|
<a routerLink="/crisis-center" routerLinkActive="active">Crisis Center</a>
|
|
|
|
<a routerLink="/heroes" routerLinkActive="active">Heroes</a>
|
2015-12-31 19:55:53 -05:00
|
|
|
</nav>
|
2015-12-10 12:40:54 -05:00
|
|
|
<router-outlet></router-outlet>
|
2016-08-09 12:38:25 -04:00
|
|
|
`
|
2016-06-09 14:00:26 -04:00
|
|
|
// #enddocregion template
|
2015-12-10 12:40:54 -05:00
|
|
|
})
|
|
|
|
export class AppComponent { }
|