angularjs - calling two different functions using ng-click -
i trying call 2 different functions using ng-click="reset();search()"
isn't working. correct way of using ng-click multiple functions?
your html should (vm 'controller'):
<a ng-click="vm.multiplemethodcalls()">link text</a>
your controller should have method (es5 code style) calls 2 other (or more if want) methods:
function multiplemethodcalls() { this.reset(); this.search(); }
what not want litter templates more , more code , logic. remember saying 'kiss', keep simple stupid, simpler better. moving logic controller easy understand , allows little more control.
Comments
Post a Comment