ng-click shoots twice with a click on the mobile resolution

0

I have the following problem:   ng-click fires twice with a click on the mobile resolution, when executed in the browser there is no problem.

$scope.consultaItensMesa = function consultaItensMesa(mesa) {
    try {
        if (!mesa.show_item) {
            $http({
                method: 'GET',
                url: $rootScope.raiz_ws + 'mesa/item',
                params: {
                    id_pedido: mesa.id_pedido
                }
            }).then(function successCallback(response) {

                if (response.status !== 204) {
                    if (response.data.resultado !== undefined) {
                        mesa.itens_mesa = response.data.resultado[0].pedidoitem;
                        mesa.show_item = !mesa.show_item;
                        console.log('cai duas vezes por click na resolução dos celilares aqui!!');   
                    }
                }
            }, function errorCallback(response) {
                console.log(response);
            });
        } else {
            mesa.show_item = false;
        }

    } catch (e) {
        alertify.alert(e.message);
    }
};

And the HTML:

<div ng-init="init(1)" >
    <button class="btn btn-danger btn-fab fa fa-list-ul"
        style="background-color: gray" ng-click="consultaItensMesa(mesa)"></button>
    
asked by anonymous 20.07.2017 / 15:54

0 answers