Assigning 'active' class to selected list item in EmberJS

后端 未结 12 2086
星月不相逢
星月不相逢 2020-12-08 00:34

I have a list and I\'d like to set one item as class=\"active\" automatically. Given the following bootstrap code:

12条回答
  •  自闭症患者
    2020-12-08 01:02

    A lot of these answers are outdated. Here is a much cleaner (and DRY) version for Bootstrap and Ember 2.x:

    {{#link-to "index" tagName="li" as |link|}}
      Index Page
    {{/link-to}}
    

提交回复
热议问题