0

This is my file structure:

enter image description here

I don't know what is the best or most recommended way to talk, get variable data, send variables to another (in this case, from metrix.js to errorslist.js) js file... or to the parent js (in this case, from metrix.js or errorslist.js to tabs.js... or vice versa)

I was thinking about watching a global variable but that was said to be a workaround...

EDIT: pass data without navigating to the said page... :)

Please help thanks...

Manson Mamaril
  • 153
  • 2
  • 13
  • One possible way to pass context while navigating between the pages. You could find, how to do that in the documentation. - https://docs.nativescript.org/core-concepts/navigation#navigate-and-pass-context – Nikolay Tsonev Aug 23 '16 at 14:22
  • added a new detail... – Manson Mamaril Aug 23 '16 at 14:25
  • Perhaps you could use global variable as you suggested in your question above or to use application settings. http://stackoverflow.com/questions/31502225/adding-a-global-variable-function-in-javascript-specifically-nativescript https://docs.nativescript.org/cookbook/application-settings However could you provide more information about the scenario, when you want to use such pass data between the files. – Nikolay Tsonev Aug 23 '16 at 14:40
  • @NikolayTsonev: Then how would I be able to make the other metrix.js that a variable inside errorslist.js already contains a value... it is filled with content via http so it will take some time before it will be completed... – Manson Mamaril Aug 23 '16 at 15:03
  • 1
    Why not create a singleton that can be accessed in the files that need to share the information? – Pytth Aug 23 '16 at 18:38

0 Answers0