ionic 添加 ngCordova
ngCordova使用很简单,首先在项目目录下,使用bower工具安装
   bower install ngCordova    
然后将ng-cordova.js或者ng-cordova.min.js添加到index.html中的cordova.js引入之前
<script src="lib/ngCordova/dist/ng-cordova.js"></script>
<script src="cordova.js"></script>
在js中添加ngCordova依赖 
   angular.module('myApp', ['ngCordova'])  
在使用每个插件之前,必须先检测设备是否就绪  
  $ionicPlatform.ready(function() { 
    $cordovaPlugin.someFunction().then(success, error); 
  });  
                    
                
                
            
        
浙公网安备 33010602011771号