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

42 lines
981 B
JavaScript

// #docplaster
// #docregion appexport
(function(app) {
// #enddocregion appexport
// #docregion metadata
// #docregion appexport
// #docregion constructorproto
function HeroComponent() {
this.title = "Hero Detail";
}
// #enddocregion constructorproto
// #enddocregion appexport
HeroComponent.annotations = [
new ng.core.Component({
selector: 'hero-view',
template: '<h1>Hero: {{getName()}}</h1>'
})
];
// #docregion constructorproto
HeroComponent.prototype.getName = function() {return 'Windstorm';};
// #enddocregion constructorproto
// #enddocregion metadata
app.HeroesModule =
ng.core.NgModule({
imports: [ ng.platformBrowser.BrowserModule ],
declarations: [ HeroComponent ],
bootstrap: [ HeroComponent ]
})
.Class({
constructor: function() {}
});
// #docregion appexport
app.HeroComponent = HeroComponent;
})(window.app = window.app || {});
// #enddocregion appexport