import { Component, OnInit, ViewChild, Input, ElementRef } from '@angular/core'; // import { NotifyService, NotifyOptions, BsModalService } from '@farris/ui-notify'; import { NotifyService, NotifyOptions } from '@farris/ui-notify'; @Component({ selector: 'app-notify-demo', templateUrl: './notify-demo.component.html', styleUrls: ['./notify-demo.component.scss'] }) export class NotifyDemoComponent implements OnInit { codePath = { baseDemo: 'assets/codes/notify/basedemo' }; @ViewChild('pos') pos: ElementRef; constructor(private notifyService: NotifyService) { } ngOnInit() { this.notifyService.config.position = this.pos.nativeElement.value; } changePosition(pos) { this.notifyService.config.position = pos; } show(notifyType: string) { this.notifyService[this.notifies[notifyType].type]({ msg: this.notifies[notifyType].msg, timeout: this.timer }); } showNoTitle(notifyType: string) { this.notifyService[this.notifies[notifyType].type]({ msg: this.notifies[notifyType].msg, timeout: this.timer }); } }