2016-03-16 18:01:33 +02:00
|
|
|
// #docplaster
|
|
|
|
(function(app) {
|
|
|
|
// #docregion
|
|
|
|
function HeroComponent() {}
|
|
|
|
// #enddocregion
|
|
|
|
HeroComponent.annotations = [
|
|
|
|
new ng.core.Component({
|
|
|
|
selector: 'hero-lifecycle',
|
|
|
|
template: '<h1>Hero: {{name}}</h1>'
|
|
|
|
})
|
|
|
|
];
|
|
|
|
// #docregion
|
2016-10-13 17:59:00 +01:00
|
|
|
HeroComponent.prototype.ngOnInit = function() {
|
|
|
|
this.name = 'Windstorm';
|
|
|
|
};
|
2016-03-16 18:01:33 +02:00
|
|
|
// #enddocregion
|
|
|
|
|
2016-08-09 17:38:25 +01:00
|
|
|
app.HeroesLifecycleModule =
|
|
|
|
ng.core.NgModule({
|
|
|
|
imports: [ ng.platformBrowser.BrowserModule ],
|
|
|
|
declarations: [ HeroComponent ],
|
|
|
|
bootstrap: [ HeroComponent ]
|
|
|
|
})
|
|
|
|
.Class({
|
|
|
|
constructor: function() {}
|
|
|
|
});
|
2016-03-16 18:01:33 +02:00
|
|
|
|
|
|
|
})(window.app = window.app || {});
|