Dynamic Dialog not closing programatically without click event

UI Components for Angular
Post Reply
bhadr3
Posts: 1
Joined: 18 Jul 2022, 19:09

19 Jul 2022, 06:46

Currently I am trying to close dynamic dialog inside observable subscribe call, but I am not able to close it. If I change this to click event then it is able to close the dialog. Could someone please help where I am making mistake?

This is code inside show component.

Code: Select all

//This does not works
public ngOnInit() {
  this.idle.onIdleEnd.subscribe(() => this.ref.close());
 }
  
  // This works
onClose(){
  this.ref.close();
}

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 20 guests