ng2-bootstrap-base-modified
Version:
Native Angular Bootstrap Components Typeahead modified
24 lines (19 loc) • 564 B
text/typescript
import { Component, ViewChild } from '@angular/core';
import { ModalDirective } from 'ng2-bootstrap/modal';
@Component({
selector: 'demo-modal-auto-shown',
templateUrl: './auto-shown.html'
})
export class DemoAutoShownModalComponent {
@ViewChild('autoShownModal') public autoShownModal:ModalDirective;
public isModalShown:boolean = false;
public showModal():void {
this.isModalShown = true;
}
public hideModal():void {
this.autoShownModal.hide();
}
public onHidden():void {
this.isModalShown = false;
}
}