angular-cn/public/docs/_examples/cb-ts-to-js/js/app/hero-lifecycle.component.js
Filipe Silva 12eb19fa3c feat(cb-ts-to-js): add es6 examples
update docshredder to shred .es6
optimized focus gulp task
convert imports and metadate sections
add DI section
add host and query metadata section
add intro
fix capitalization and grammar
2016-11-11 19:44:17 -08:00

29 lines
642 B
JavaScript

// #docplaster
(function(app) {
// #docregion
function HeroComponent() {}
// #enddocregion
HeroComponent.annotations = [
new ng.core.Component({
selector: 'hero-lifecycle',
template: '<h1>Hero: {{name}}</h1>'
})
];
// #docregion
HeroComponent.prototype.ngOnInit = function() {
this.name = 'Windstorm';
};
// #enddocregion
app.HeroesLifecycleModule =
ng.core.NgModule({
imports: [ ng.platformBrowser.BrowserModule ],
declarations: [ HeroComponent ],
bootstrap: [ HeroComponent ]
})
.Class({
constructor: function() {}
});
})(window.app = window.app || {});