ember-cli-active-link-wrapper icon indicating copy to clipboard operation
ember-cli-active-link-wrapper copied to clipboard

Support conditionals inside the wrapper

Open orf opened this issue 9 years ago • 1 comments

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?

orf avatar Nov 17 '15 11:11 orf

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

alexspeller avatar Nov 21 '15 22:11 alexspeller