Must use ngCordova?


#1

Hi,

there is some more cordova plugin which out of http://ngcordova.com/, can I use those cordova with ionic?

for example, this one:

how can I use it?

these is my steps:

  1. cordova plugin add https://github.com/iVanPan/Cordova_QQ.git --variable QQ_APP_ID=YOUR_QQ_APPID

  2. include the js to my ionic index file

  3. copy the code to app.js:

    .run(function($ionicPlatform,YCQQ) {
    if (window.cordova && window.cordova.plugins) {
    YCQQ.checkClientInstalled(function(){
    alert(‘client is installed’);
    },function(){
    alert(‘client is not installed’);
    });
    }
    })

after I finish these step, I just got the blank page in my ios simulator, am I doing something wrong?

plz advise.
thx!


#2

Try remove YCQQ injection from the run function(line 1).


#3

Generally speaking, yes you can use any Cordova plugin directly, you don’t need to use ngCordova. ngCordova simply provides a more convenient, Angular-friendly wrapper around the most common plugins.


#4

thank your guys, I have figure out what it is. thx!