(function(app) {
// #docregion
var TitleComponent = ng.core.Component({
selector: 'hero-title',
template:
'
{{titlePrefix}} {{title}}
' +
'' +
''
}).Class({
constructor: [
[
new ng.core.Optional(),
new ng.core.Inject('titlePrefix')
],
new ng.core.Attribute('title'),
[
new ng.core.Query('okMsg'),
ng.core.ElementRef
],
function(titlePrefix, title, msg) {
this.titlePrefix = titlePrefix;
this.title = title;
this.msg = msg;
}
],
ok: function() {
var msgEl =
this.msg.first.nativeElement;
msgEl.textContent = 'OK!';
}
});
// #enddocregion
var AppComponent = ng.core.Component({
selector: 'hero-di-inject-additional',
template: '' +
'' +
'',
directives: [TitleComponent]
}).Class({
constructor: function() { }
});
app.HeroDIInjectAdditionalComponent = AppComponent;
})(window.app = window.app || {});