Use ng-click
like in your previous question.
Your problem was that ng-click
takes an AngularJS expression. See: https://docs.angularjs.org/guide/expression
"If you want to run more complex JavaScript code, you should make it a controller method and call the method from your view."
So just set a function in the $scope
of the controller for that element and call it through ng-click="clickHander()"
.
If this doesn't help, you need to post more code (preferably in JSFiddle or something like).