Ember.js: ensure that the linkTo helper keeps the active class along a nested route

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 make sure the link is above .active while I'm on the settings.* Path?

+4
source share
1 answer

I am sure that if you use instead:

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

it will remain active while you are within the settings.* route settings.* . The above link will in any case be routed to settings.index .

+3
source

Source: https://habr.com/ru/post/1484465/


All Articles