4
votes

Take the following route:

@resource 'settings', path: '/settings', ->
  @route 'alerts'

and the following link:

{{#linkTo settings.index}}Settings{{/linkTo}}

Is there a specific way in Ember to ensure that the above link is .active as long as I am at a settings.* route?

1
I tend to do computed property for this, but I'm curious to see other (proper) implementations.MilkyWayJoe

1 Answers

3
votes

I'm pretty sure that if you instead use:

{{#linkTo "settings"}}Settings{{/linkTo}}

it will stay active as long as you are within the settings.* route. The above link will route to settings.index anyway.