I want to add a class of 'active' to the nav list item that is currently being rendered by Iron Router.
Here's my markup:
<ul>
<li>
{{#linkTo route="option1"}}
<span class="fa fa-fw fa-option"></span>
Option 1
{{/linkTo}}
</li><li>
{{#linkTo route="option2"}}
<span class="fa fa-fw fa-option"></span>
Option 2
{{/linkTo}}
</li>
</ul>
I've read through the guide and various articles but can't find this covered anywhere. Assuming I'll need some sort of helper?
I think you might find meteor-iron-router-active useful, as it has helpers for the following:
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