Change class on mouseover in directive

前端 未结 4 1832
醉梦人生
醉梦人生 2020-12-12 19:31

I am having trouble working out how to get a class to change on a nested directive.

This is the outer ng-repeat

4条回答
  •  囚心锁ツ
    2020-12-12 20:02

    I think it would be much easier to put an anchor tag around i. You can just use the css :hover selector. Less moving parts makes maintenance easier, and less javascript to load makes the page quicker.

    This will do the trick:

    
    
    
    

    jsfiddle example

提交回复
热议问题