import {AfterViewInit, Component, ElementRef, EventEmitter, Input, Output, ViewChild} from "@angular/core"; @Component({ selector:'basic-dialog', template:`
` }) export class BasicDialog implements AfterViewInit{ @ViewChild('modal') private _modal:ElementRef; @Input() Width='500px'; @Input() Title='Title '; @Input() ApplyIcon=''; @Input() ApplyText='Apply'; @Input() CancelText='Cancel'; @Input() CancelIcon=''; @Input() public IsLoading=false; private $modal:any=null; @Output() public OnApply=new EventEmitter(); ngAfterViewInit(): void { this.$modal=(jQuery(this._modal.nativeElement) as any); this.$modal.modal('hide'); } private Apply() { this.OnApply.emit(); } Open(){ this.$modal.modal('show'); } Close(){ this.$modal.modal('hide'); } } declare let jQuery:any;