30 lines
606 B
Plaintext
30 lines
606 B
Plaintext
|
import { Attribute, Component, Inject, Optional } from '@angular/core';
|
||
|
|
||
|
// #docregion
|
||
|
export class HeroTitleComponent {
|
||
|
constructor(titlePrefix, title) {
|
||
|
this.titlePrefix = titlePrefix;
|
||
|
this.title = title;
|
||
|
this.msg = '';
|
||
|
}
|
||
|
|
||
|
ok() {
|
||
|
this.msg = 'OK!';
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// #docregion templateUrl
|
||
|
HeroTitleComponent.annotations = [
|
||
|
new Component({
|
||
|
moduleId: module.id,
|
||
|
selector: 'hero-title',
|
||
|
templateUrl: 'hero-title.component.html'
|
||
|
})
|
||
|
];
|
||
|
// #enddocregion templateUrl
|
||
|
|
||
|
HeroTitleComponent.parameters = [
|
||
|
[new Optional(), new Inject('titlePrefix')],
|
||
|
[new Attribute('title')]
|
||
|
];
|