简体   繁体   English

从外部访问Ember应用程序实例(cordova)

[英]Access Ember application instance from outside (cordova)

I want to acccess my Ember application from the outside (cordova build). 我想从外面接受我的Ember应用程序(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. 但是我的应用程序在内部cordova时无法在窗口上使用。 Is there a clean way to access my ember app from inside Cordova? 有没有一种干净的方式从Cordova内部访问我的余烬应用程序? The purpose is to trigger Ember code from within a custom plugin. 目的是从自定义插件中触发Ember代码。

https://github.com/ember-cli/ember-export-application-global 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. 使用此插件,您可以让您的应用将应用名称导出到全局范围的顶级。 ie Window.YourAppName Window.YourAppName

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM