WHat Link Should I Put in One Signal Additional Data Target Url

WHat Link Should I Put in One Signal Additional Data Target Url???

Please any help???

Additional Data is a key value pair in JSON Format. In your case target url is a key which you are sending to your app. What you do with the value depends on your app.

What are you trying to do with the target url?

want to redirect my app to a specific page

codes in app.js

if(window.plugins && window.plugins.OneSignal){
window.plugins.OneSignal.enableNotificationsWhenActive(true);
var notificationOpenedCallback = function(result){
// $state.go(‘app.post’, { “postId”: “49726”});

				var data = result.notification.payload.additionalData;
				  if (data && data.targetUrl) {
				    var state = $injector.get($state);
				    state.go(data.targetUrl);
				  }
				};

.state(“npp_newspaper.breaking_news”, {
url: “/breaking_news”,
cache:false,
views: {
“npp_newspaper-side_menus” : {
templateUrl:“templates/npp_newspaper-breaking_news.html”,
controller: “breaking_newsCtrl”
},
“fabButtonUp” : {
template: ‘’,
},
}
})

How do i redirect to this specific page by one signal additional data?

Please forgive me i dont understand how to go about it.

So help me out. Thank you

Please i want an example of how targetedUrl In One Signal looks like…

Thank you

The following works for me where i send the url as “app.post”(State of the new page) and the specific id i want to go to in a list output.

.run(function($ionicPlatform, $state) {
$ionicPlatform.ready(function() {
var notificationOpenedCallback = function(jsonData) {
 if (jsonData.additionalData) {
  if (jsonData.additionalData.myappurl)
      $state.go(jsonData.additionalData.myappurl, {'postId': + 
          jsonData.additionalData.myKey});
   }
 }
})
 // the rest of your code
})

Thank You…so in this can you share with me how the Url in One signal looks like…

eg. app.post.75.html

or how exactly will it look like…

Sorry for the delay.