I have a nav bar that has special CSS that shows up when a link has the "active" class on it. It looks something like this:
<ul>
<li>{{link-to "routeName"}}<i class="icon-up"></i>{{/link-to}}</li>
{{!-- more list items like the previous one... --}}
</ul>
However, when I click on the link with "routeName", a rather expensive query is made that may be slow at times. I have a LoadingRoute set up with a loading view that consists of a simple spinner, but it seems like the link does not receive the "active" class until the route's promise is resolved. Is there a Handlebars-friendly way to tell link-to to immediately set the "active" class when it is clicked?
The reason for this is that the URL does not get updated until the end of a transition. Thanks to the peeps in the Ember IRC and Machty, this is an issue that has been resolved and will be in the next beta cycle.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With