How to highlight a selected row in ngRepeat?

前端 未结 3 1956
Happy的楠姐
Happy的楠姐 2020-12-02 13:56

I couldn\'t find something that will help me to solve this simple issue in Angular. All the answers are relevant for navigation bars when a comparison is being made against

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-02 14:51

    I needed something similar, the ability to click on a set of icons to indicate a choice, or a text-based choice and have that update the model (2-way-binding) with the represented value and to also a way to indicate which was selected visually. I created an AngularJS directive for it, since it needed to be flexible enough to handle any HTML element being clicked on to indicate a choice.

    • ...

    Solution: http://jsfiddle.net/brandonmilleraz/5fr9V/

提交回复
热议问题