angularjs - Update ng-click value after the click - angular JS -
suppose have function phone call ng-click , after function class, if suppose function called - how scenario achieved??
for eg:
the function1() should alter ng-click's value function2()
can please solve scenario?
html:
<button ng-click="afunction()">click me</button>
controller code:
angular.module('yourmodule').controller(function($scope){ function function1(){ //whatever want first function do; $scope.myfunction = function2; }; function function2(){ }; $scope.myfunction = function1; });
angularjs
No comments:
Post a Comment