Must use ngCordova?

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!

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

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.

1 Like

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