【发布时间】:2016-01-25 09:58:00
【问题描述】:
angular.module('starter.controllers', [])
.controller('DashCtrl', function($scope, $cordovaBarcodeScanner) {
$scope.scanBLEDevices = function(){
alert("BLE SCANNING.....");
}
});
我还在使用带有 Ionic 的 NgCordova 和 Angular Meterial,并在移动设备(三星 s4)上进行测试,我收到了两次警报。 我觉得 CALLBACK 有问题??
【问题讨论】:
-
提供有关谁在调用 scanBLEDevices 的更多信息。它可能会被调用两次
-
<ion-view view-title="Dashboard"> <ion-content class="padding"> <h2>BLE Using Evothings</h2> <button class="button button-block button-positive" ng-click="scanBLEDevices()"> BLE Scan </button> </ion-content> </ion-view> This is my code i just call only once.. but it is tiggered twice.测试
标签: angularjs ionic-framework ngcordova