I am looking for a HelloWorld cordova plugin ready for ionic


I want to create cordova plugins using angular ( or ionic ), but i don’t find a tutorial ( with angular / ionic ) or a boilerplate to start with.

If you have ressources and want to share, thanks to you :slight_smile:

Hey there!

So your looking into how to make a cordova plugin?
You might want to check out cordova and our ng-cordova wrapper

Nice that’s what i need,

I understand well the first link, creating the plugin.xml, javascript interface and native interfaces,
but I don’t know how to use the second link… i’ll try to compare existing ngCordova plugins js interface with the first link js interface.

Well the second link is an add on. It takes the vanilla js cordova plugin and makes an angular wrapper out of it so that way you can use the plugin with angular and get everything to run with out throwing errors.

I don’t understand how to use it :confused: never used vanilla js before, it seems to be like jquery ?

I am creating a plugin with cordovaDoc’s help and using device plugin js interface to make it work with ionic

Do you know what’s the “module” object at the last line of this code ? it’s from the JS interface of the device plugin ( link ).

Device.prototype.getInfo = function(successCallback, errorCallback) {
argscheck.checkArgs('fF', 'Device.getInfo', arguments);
exec(successCallback, errorCallback, "Device", "getDeviceInfo", []);

module.exports = new Device();

Thanks for help and excuse my poor english !