离子科尔多瓦打印机错误

问题描述:

我试图使用从科尔多瓦打印机插件:https://github.com/katzer/cordova-plugin-printer/tree/master离子科尔多瓦打印机错误

我按照安装说明和index.html中有这样的:

<script src="lib/ngCordova/dist/ng-cordova.js"></script> 
<script src="cordova.js"></script> 

这里是我的电话控制器:

$scope.printTable = function(){ 
    $ionicPlatform.ready(function() { 
    cordova.plugins.printer.isAvailable(
     function (isAvailable) { 
      alert(isAvailable ? 'Service is available' : 'Service NOT available'); 
     }); 
    }) 
    }; 

我得到的PhoneGap应用此错误:

Error: undefined is not an object (evaluating 'cordova.plugins.printer') 

我有这个加在我的config.xml文件:

<gap:plugin name="de.appplant.cordova.plugin.printer" version="0.7.0" /> 

我在这里失踪

$scope.print = function() { 
    if ($cordovaPrinter.isAvailable()) { 
     $cordovaPrinter.print(//type what to display); 
    } else { 
     alert("Printing is not available on device"); 
    } 
} 

什么只是尝试这样