How to hide a button on the Ionic / Angular after it is clicked with ng-click?

0

I have a button, normal, with an ng-click calling a function:

<button class="button button-full button-balanced" ng-click="fechaPedido(pedido.observacao )">
        FINALIZAR PEDIDO
    </button>

I would like it to be disabled once the button has been clicked until the function completes. Because users are clicking the button and repeating their actions.

Or is there another way?

Thank you.

    
asked by anonymous 06.04.2017 / 17:22

1 answer

1

I solved by adding $ ionicLoading.show (); in the start function and $ ionicLoading.hide (); at the end of the function.

    
06.04.2017 / 18:05