I am trying set a variable's value inside ng click which is not working.
<a href="#newpage" ng-click="service.name='{{sub.cid}}'"> view</a>
But when i use plain text instead of angular data value it works fine.
<a href="#newpage" ng-click="service.name='abc'">
What is wrong in my code ?
Remove string interpolation and directly use sub.cid
<a href="#newpage" ng-click="service.name=sub.cid"> view</a>