Custom plugin browser proxy


#1

I have a prototype app with vanilla Cordova, using a custom plugin,
wich exposes a js-module clobbered to a global:<js-module src="Client.js" name="com.alec.cordova.ssh.Client"> <clobbers target="alec_ssh" /> </js-module>

the plugin has a mocked proxy implementation defined as follow:
in plugin.xml:<platform name="browser"> <js-module src="BrowserProxy.js" name="BrowserProxy"> <runs /> </js-module> </platform>

and in BrowserProxy.js :require("cordova/exec/proxy").add("#FEATURE_NAME#", _exported_object);

this setup works well for fast developing in browser, as cordova loads BrowserProxy.js and binds it as the plugin’s feature in the browser platform.

i’m trying to migrate to Ionic, but the same setup does not work in this environment.
Cordova.js is not loaded and IonicFramework doesn’t load any of the plugin’s script .
I also tried to require them in angular.module definition as dependecies.

The questions are:
How to set a similar dev env in ionic?
using ngCordova maybe?
implementing the proxy in another way?
I used to access the plugin’s features by mean of the js-module’s clobbered global, is it the same in ionic or should it be done by mean of angular’s [ dependency injection | module requirements ] ?
Thanks!
Alex