0

I have nativescript app where in app.js is set:

application.run({ 
    moduleName: "app-root/app-root", 
    context: { 
        param1: "A",
        param2: "B",
        param3: "C",
        param4: "D" 
    } 
});

This fires up app-root (Side drawer) but does not pass any params to it. Is this even possible to use this way? I have push notifications implemented and when notification fires up app, it should send received params to "app-root" page. I've tried with appSettings but it's not best (speed) option. Any suggestions? Thx

Thanks

Maka
  • 371
  • 3
  • 14
  • I guess `context` is supported only on Page not in root view. Either you may listen for notification from root view Or store data in a module / global object, access the same from root view. – Manoj Feb 15 '20 at 00:42
  • Hi manoj, I've tried that and it is one of solutions. I've figured out that if app is "killed", notification's data (payload) is not processed and stored in global var / local storage. – Maka Feb 17 '20 at 21:58

0 Answers0