Ionic 2 diverting route from notifications

I have done deeplinking successfully when the url is called from outside the application (i.e. myapp: // firstpage / 1).

ngAfterViewInit() {
  this.platform.ready().then(() => {
    Deeplinks.routeWithNavController(this.nav, {
      '/test': LoginPage,
    })
  });
}

      

When I get a notification from the server, I get the route estimate / 1. How can I redirect after clicking on it using deepinking method so I can use 'assessment/:assessmentId': assessmentDetailPage

.

There is always the option to do an if or a switch, but I am trying to avoid this since I would also like to use defaultHistory.

I am open to other suggestions.

+3


source to share





All Articles