I have a code inside ng-repeat
<tr ng-repeat="location in assetLocations track">
<span class="fa fa-remove fa-lg text-danger" style="cursor: pointer;"
ng-show="location.isEdit"
ng-click="readOnly===false ? (cancel();location.isEdit = false; updateClicked = false;) : null"></span>
</tr>
Here location.isEdit property is set on the fly.
I want to set a conditional ng-click to span. But the code above gives the following error
angular.js:11598 Error: [$parse:syntax] Syntax Error: Token ';' is unexpected, >>expecting [)] at column 29 of the expression [readOnly===false ? >>(cancel();location.isEdit = false; updateClicked = false;) : null] starting at >>[;location.isEdit = false; updateClicked = false;) : null].
I can set the variables inside the function, but I need to set the variables and call the functions on ng-click
How to use the conditional ng-click for this type of scenario?