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
59 lines
1.3 KiB
JavaScript
59 lines
1.3 KiB
JavaScript
(function(app) {
|
|
|
|
// #docregion parameters
|
|
function HeroComponent(name) {
|
|
this.name = name;
|
|
}
|
|
HeroComponent.parameters = [
|
|
'heroName'
|
|
];
|
|
HeroComponent.annotations = [
|
|
new ng.core.Component({
|
|
selector: 'hero-di-inject',
|
|
template: '<h1>Hero: {{name}}</h1>'
|
|
})
|
|
];
|
|
// #enddocregion parameters
|
|
|
|
app.HeroesDIInjectModule =
|
|
ng.core.NgModule({
|
|
imports: [ ng.platformBrowser.BrowserModule ],
|
|
providers: [ { provide: 'heroName', useValue: 'Windstorm' } ],
|
|
declarations: [ HeroComponent ],
|
|
bootstrap: [ HeroComponent ]
|
|
})
|
|
.Class({
|
|
constructor: function() {}
|
|
});
|
|
|
|
})(window.app = window.app || {});
|
|
|
|
(function(app) {
|
|
// #docregion ctor
|
|
var HeroComponent = ng.core.Component({
|
|
selector: 'hero-di-inline2',
|
|
template: '<h1>Hero: {{name}}</h1>'
|
|
})
|
|
.Class({
|
|
constructor: [
|
|
new ng.core.Inject('heroName'),
|
|
function(name) {
|
|
this.name = name;
|
|
}
|
|
]
|
|
});
|
|
// #enddocregion ctor
|
|
|
|
app.HeroesDIInjectModule2 =
|
|
ng.core.NgModule({
|
|
imports: [ ng.platformBrowser.BrowserModule ],
|
|
providers: [ { provide: 'heroName', useValue: 'Bombasto' } ],
|
|
declarations: [ HeroComponent ],
|
|
bootstrap: [ HeroComponent ]
|
|
})
|
|
.Class({
|
|
constructor: function() {}
|
|
});
|
|
|
|
})(window.app = window.app || {});
|