Ionic push: how to handle notification payload

am using ionic push to deliver push notification to the App it’s working very well, however i want to ask how to use the notification to open specific view in the app i.e: product view when new product added.

If you define a state in the push’s payload, Ionic detects it and transitions the view. This article by Raymond Camden helped me understand the process: Ionic Push example supporting State Changes

Thank you, but am still having an issue with registering the user for notification in the run block.

Because it runs before i identify the user which is done in sign up controller, this cause two problems for me first the dialog asking for allow notification now showing even before signing up second problem am not getting the token of the device because registering user for notification execute before identify the user. Any idea.