2016-03-16 12:01:33 -04:00
|
|
|
// #docplaster
|
|
|
|
// #docregion
|
2016-05-03 08:06:32 -04:00
|
|
|
import { Component, OnInit }
|
2016-04-27 14:28:22 -04:00
|
|
|
from '@angular/core';
|
2016-03-16 12:01:33 -04:00
|
|
|
// #enddocregion
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'hero-lifecycle',
|
|
|
|
template: `<h1>Hero: {{name}}</h1>`
|
|
|
|
})
|
|
|
|
// #docregion
|
|
|
|
export class HeroComponent
|
|
|
|
implements OnInit {
|
2016-06-07 19:06:25 -04:00
|
|
|
name: string;
|
2016-03-16 12:01:33 -04:00
|
|
|
ngOnInit() {
|
|
|
|
this.name = 'Windstorm';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// #enddocregion
|