I have html like
- one
- two
- tree
now on ng-click of every 'li' element I want to add class 'active' and remove from other 'li' elements. Also, if the same 'li' is clicked again then I want to remove class 'active'
I have html like
now on ng-click of every 'li' element I want to add class 'active' and remove from other 'li' elements. Also, if the same 'li' is clicked again then I want to remove class 'active' |
|||
change your html like
and add new function
chekout the working fiddle |
|||
|
ngRepeat
? – Ron Dadon 15 mins ago