Javascript ngclick在单击按钮Angularjs时触发两次

Javascript ngclick在单击按钮Angularjs时触发两次,javascript,angularjs,ionic-framework,Javascript,Angularjs,Ionic Framework,我使用它来创建每次单击按钮时的通知 该示例在模拟器上运行良好,但在手机上会触发两次! 这是控制器 angular.module('starter.toolsController', ['ui-notification']) .controller('toolsController', function($scope, Notification) { $scope.BottomCenter1 = function() { Notification.warning({message: '

我使用它来创建每次单击按钮时的通知

该示例在模拟器上运行良好,但在手机上会触发两次! 这是控制器

angular.module('starter.toolsController', ['ui-notification'])

.controller('toolsController', function($scope, Notification) {

$scope.BottomCenter1 = function() {
    Notification.warning({message: 'Messenger d entreprise', positionY: 'bottom', positionX: 'center'});
};
和按钮:

<button class="box1" ng-click="BottomCenter2()"> MyRhoom </button>
MyRhoom

我做错了什么?

这是所有相关代码吗?您的按钮也调用了
BottomCenter2()
,但您给了我们
BottomCenter1()
的代码。我有6个按钮,它们都是一样的。所以它是box1、box2……等等和BottomCenter1()、BottomCenter2()等等。你认为你能用你的例子制作一个沙坑或JSFIDLE吗?试试使用FastClick或lookup ngTouch。Angular 1从未真正为移动设备设计过。