Я новичок в Угловые 2, я впрыскиваюсь директива в текущем компонентеКак вызвать метод, определенный в угловой 2 директиве
@Component({
selector: 'select-me',
templateUrl: 'app/template.html',
directives: [BackgroundChange] // I want to access this same instance to make the dynamic changes
})
export class PageComponent {
constructor(private backgroundChange:BackgroundChange) {
// I guess this will create new instance of BackgroundChange
}
}
Я хочу вызвать методы Availabe в BackgroundChange, чтобы сделать некоторые изменения динамически PageComponent