import { Component , Injector } from '@angular/core' ; import { ComposerService } from '../services/composer.service' ; import { ModalService } from '../components/modal/modal.service' ; @ Component ( { selector : 'm-composer__topbarButton' , templateUrl : './topbar-button.component.html' , providers : [ ComposerService ] , } ) export class ComposerTopbarButtonComponent { constructor ( private composer , private composerModal , private injector ) { } onClick ( e ) { this . composerModal . setInjector ( this . injector ) . present ( ) . toPromise ( ) ; } }