import {ChangeDetectionStrategy, Component, Input, ViewEncapsulation} from '@angular/core'; import {SnotifyService} from '../../snotify.service'; import {SnotifyToast} from '../snotify-toast.model'; @Component({ selector: 'ng-snotify-button', templateUrl: './buttons.component.html', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, }) /** * Buttons component */ export class ButtonsComponent { /** * Get buttons Array */ @Input() toast: SnotifyToast; constructor(private service: SnotifyService) {} /** * remove toast */ remove() { this.service.remove(this.toast.id); } }