當我ionic serve
,我的主網頁控制檯顯示我這個錯誤:離子不成立cordova.js
ng-cordova-beacon.js:53 Uncaught ReferenceError: cordova is not defined
at Object.requestWhenInUseAuthorization (ng-cordova-beacon.js:53)
at app.js?ionicCachebuster=10643:25
at Array.<anonymous> (ionic.bundle.js?ionicCachebuster=10643:56238)
at onPlatformReady (ionic.bundle.js?ionicCachebuster=10643:2496)
at onWindowLoad (ionic.bundle.js?ionicCachebuster=10643:2477)
但在HTML的頁面有:
<!-- ionic/angularjs js -->
<script src="lib/ionic/js/ionic.bundle.js?ionicCachebuster=10643"></script>
<!-- cordova script (this will be a 404 during development) -->
**<script src="cordova.js"></script>**
<script src="js/ng-cordova-beacon.js"></script>
誰都可以幫我? ;)
看這裏:http://stackoverflow.com/a/31368993/6921903 – hydrococcus