2016-11-13 14:09:28 -08:00
|
|
|
import { Component, Inject } from '@angular/core';
|
2016-03-16 18:01:33 +02:00
|
|
|
|
|
|
|
// #docregion
|
|
|
|
@Component({
|
|
|
|
selector: 'hero-di-inject',
|
|
|
|
template: `<h1>Hero: {{name}}</h1>`
|
|
|
|
})
|
2016-11-13 14:09:28 -08:00
|
|
|
export class HeroComponent {
|
2016-10-13 17:59:00 +01:00
|
|
|
constructor(@Inject('heroName') private name: string) { }
|
2016-03-16 18:01:33 +02:00
|
|
|
}
|
|
|
|
// #enddocregion
|