30 lines
		
	
	
		
			608 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			608 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
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')]
 | 
						|
];
 |