How do I bind to the active class of a link using the new Ember router?

前端 未结 9 1628
天命终不由人
天命终不由人 2020-12-08 01:17

I\'m using Twitter Bootstrap for navigation in my Ember.js app. Bootstrap uses an active class on the li tag that wraps navigation links, rather th

9条回答
  •  孤街浪徒
    2020-12-08 01:41

    You can skip extending a view and use the following.

    {{#linkTo "index" tagName="li"}}Homes{{/linkTo}}
    

    Even without a href Ember.JS will still know how to hook on to the LI elements.

提交回复
热议问题