mazdik / ng-modal

Angular resizable and draggable modal component
https://mazdik.github.io/ng-modal/
82 stars 43 forks source link

It is possible? #5

Closed Corralini closed 5 years ago

Corralini commented 5 years ago

Hello, my name is Alejandro and i have a question, it is possible make the modal open by default? Let me explain, i want open the modal when the application start, like a welcome message or something similar.

Thanks, Alejandro Corral

mazdik commented 5 years ago
@ViewChild('childModal', {static: false}) childModal: ModalComponent;
ngAfterViewInit() {
  this.childModal.show();
  this.childModal.hide();
}

<app-modal #childModal

Corralini commented 5 years ago
@ViewChild('childModal', {static: false}) childModal: ModalComponent;
ngAfterViewInit() {
  this.childModal.show();
  this.childModal.hide();
}

<app-modal #childModal

Thanks a lot.