MrSolution MrSolution - 5 months ago 8
Java Question

how can i get 2 functions in one ng-click?

I want to get 2 functions in one ng-click.

Here is the code:

<button class="cButtonSpeichern" ng-click="saveUser()">Speichern</button>


and i want to add this function.

alert()


can someone help me?

Answer

Make a method:

onSpeichernClick() {
    saveUser();
    alert();
}

then you can use <button class="cButtonSpeichern" ng-click="onSpeichernClick()">Speichern</button>