After clicking on LocalNotification open a alert

After clicking on LocalNotification in the status bar is directed to the APP and then I am trying to open a simple Modal but nothing happens with the following code:

  • app.component.ts

    LocalNotifications.on(“click”, function (notification) {

    let alert = this.alertCtrl.create({
        title: 'Test',
        subTitle: 'Notification Clicked',
        buttons: ['Dismiss']
      });
      alert.present();
    

});

The ‘Click OK’ message appears on the console, but the modal is not opened

Resolved, this code was at the end of the block ‘device.ready’, I just put it on the first line as soon as the ‘device.ready’ method is called and it worked fine, thanks