How I can pass ng-model as parameter in ng-click and use in scope?

Alok Sharma
Tera Contributor

How I can pass ng-model as parameter in ng-click and use in scope?

1 REPLY 1

Deepak Ingale1
Mega Sage

If your model is , lets say data.name, you can write ng-click="validateName(data.name)"

 

https://stackoverflow.com/questions/34270769/passing-ng-model-variable-through-an-ng-click-to-a-function