Best way to yield the active state of a LinkTo?


I’d like to make a {{ui-link-to}} component that basically extends Ember.LinkComponent but yields the active state, so I can use it in the block.

Is there a simple way to do this?

I see LinkComponent has an _active property which I could {{yield}} in my subclass, but that’s private.

I’ve also used the router service in the past to make my own component that effectively reimplements link-to, but I’d like to avoid that if possible.

Any ideas?


@samselikoff would this solution help you?

It never went anywhere as the core team think it is addon territory and I didn’t feel like maintaining something like that. But the concept seems sound if you wanted to make your own Ember.LinkComponent like you suggested.