21 lines
		
	
	
		
			351 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			351 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
import { Component, Inject } from '@angular/core';
 | 
						|
 | 
						|
// #docregion
 | 
						|
export class HeroComponent {
 | 
						|
  constructor(name) {
 | 
						|
    this.name = name;
 | 
						|
  }
 | 
						|
}
 | 
						|
 | 
						|
HeroComponent.annotations = [
 | 
						|
  new Component({
 | 
						|
    selector: 'hero-di-inject',
 | 
						|
    template: `<h1>Hero: {{name}}</h1>`
 | 
						|
  })
 | 
						|
];
 | 
						|
 | 
						|
HeroComponent.parameters = [
 | 
						|
  [new Inject('heroName')]
 | 
						|
];
 | 
						|
// #enddocregion
 |