emberjs – how to mark active menu item using router infrastructure

Ember 1.11+:

{{#link-to "dashboard" tagName="li"}}
  <a href="https://stackoverflow.com/questions/11628489/{{view.href}}">Dashboard</a>
{{/link-to}}

Ember < 1.11 (bind-attr required):

{{#link-to "dashboard" tagName="li"}}
  <a {{bind-attr href="https://stackoverflow.com/questions/11628489/view.href"}}>Dashboard</a>
{{/link-to}}

Leave a Comment