Ionic-cordova:如何在Ionic 1中使用cordova插件(错误:未定义插件)

时间:2016-09-01 00:15:50

标签: angularjs cordova ionic-framework cordova-plugins

我使用此命令在我现有的离子项目中安装了RadaeePDFPlugin(https://github.com/gearit/RadaeePDF-Cordova)cordova插件:

cordova plugin add https://github.com/gearit/RadaeePDF-Cordova.git

之后,安装在插件中创建了一个名为:

的文件夹
  plugins/com.radaee.cordova/

文档(https://github.com/gearit/RadaeePDF-Cordova)表示要在此命令中使用该插件:

RadaeePDFPlugin.openFromAssets(
    {
        url: "Test.PDF", //the pdf name
        password: "" //password if needed
    },
    function(message) {
         console.log("Success: " + message);
    },
    function(err){
        console.log("Failure: " + err);
    });

但运行应用程序后出现此错误:

**ionic.bundle.js:21157 ReferenceError: RadaeePDFPlugin is not defined**
at Scope.$scope.login (controllers.js:19)
at fn (eval at compile (ionic.bundle.js:21972), <anonymous>:4:273)
at ionic.bundle.js:57514
at Scope.$eval (ionic.bundle.js:24673)
at Scope.$apply (ionic.bundle.js:24772)
at HTMLButtonElement.<anonymous> (ionic.bundle.js:57513)
at HTMLButtonElement.eventHandler (ionic.bundle.js:12098)
at triggerMouseEvent (ionic.bundle.js:2865)
at tapClick (ionic.bundle.js:2854)
at HTMLDocument.tapMouseUp (ionic.bundle.js:2927)

使用此插件的正确方法是什么?

0 个答案:

没有答案