ember-cli-active-link-wrapper
ember-cli-active-link-wrapper copied to clipboard
Support conditionals inside the wrapper
Heya, Great addon, thanks for publishing it! I've run into a small issue though. When doing something like this:
{{#active-link}}
{{#if some_condition}}
{{a_link}}
{{else}}
{{some_other_link}}
{{/if}}
{{/active-link}}
Then the navigation kind of breaks - sometimes the buttons are in the wrong state and don't update etc. Moving the active-link inside the condition fixes it:
{{#if some_condition}}
{{#active-link}}{{a_link}}{{/active-link}}
{{else}}
{{#active-link}} {{some_other_link}}{{/active-link}}
{{/if}}
But it's not quite as nice. Any way you can support the former?
Hmm thanks for letting me know, I have no idea why it wouldn't work except for the fact the implentation is necessarily a bit of a hack. I'll have a look into it