Hoetmaaiers
Hoetmaaiers

Reputation: 3503

Access Ember application instance from outside (cordova)

I want to acccess my Ember application from the outside (cordova build). I thought it would be possible this way:

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

But my the App is not availlable on window when inside cordova. Is there a clean way to access my ember app from inside Cordova? The purpose is to trigger Ember code from within a custom plugin.

Upvotes: 3

Views: 825

Answers (1)

carter
carter

Reputation: 5442

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

With this addon you can have your app export the app name to the top level of global scope. i.e. Window.YourAppName

Upvotes: 4

Related Questions