Answer the question
In order to leave comments, you need to log in
How to access variable/constant in EmberJS controller?
I have a game controller, I have a setPause method, and I have const statusPause = true/false, how can I access const statusPause from other files, service, etc, to do some kind of checks depending on the status of the game?
If you do this in any file, then undefined is returned instead of bool
let game = require('../controllers/game');
console.log(game.setPause.statusPause);
Answer the question
In order to leave comments, you need to log in
You have an error due to the fact that in Cordova, by default, only the file:// scheme is available and XHR simply does not work.
The problem can be solved, for example, by setting the whitelist plugin:
Then set permission in config.xml:<allow-intent href="*://testyroki.abyshev.com/*"/>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question