jeudi 29 juin 2017

Active links in Ember based on property

In Ember.js the link-to helper automatically sets an active css-class if the the current route matches the supplied routeName.

You could change that behaviour by applying the current-when argument, to set the active class if another route matches the supplied routeName.

But now I need to make the link active if a property is true. The only thing I could think about would be:



Obviously, this does not work, because the current-when argument does only supports strings. So how could I make this work?




Aucun commentaire:

Enregistrer un commentaire