Ionic 1 Call Cordova Plug Ins


1. HTML


<button class = "button" ng-click = "callCordova()">
Call Cordova Plug In</button>


2.JS

function($scope, $stateParams) {



    var cdv = function(options) {

        console.log('begin cdv');

        document.addEventListener("deviceready", function() {

            console.log('deviceReady');

            /*cordova task begin*/




            /*cordova task end*/

        }); /*device ready*/

    } /*cdv*/

}/*controller*/

0 Comments: