Externally accessing an Ember app instance (cordova)

I want to use my Ember app outside (cordova build). I thought it would be possible like this:

window.App.__container__.lookup('controller:beacon-manager').get('currentBeacons').pushObjects(beacons);

      

But my app is not availlable on the window when inside cordova. Is there a clean way to access my e-app from inside Cordova? The goal is to run Ember code from a custom plugin.

+3


source to share


1 answer


https://github.com/ember-cli/ember-export-application-global



With this addon, you can export your app to app at the top level of the global scope. those.Window.YourAppName

+4


source







All Articles