简体   繁体   English

将CSS类更改为“活动”以获取Meteor中的导航链接

[英]Change CSS class to “active” for navigation links in Meteor

What is the best way to detect the current route in Meteor and apply a CSS class of "active" to the correct navigation elements? 在Meteor中检测当前路线并将CSS类“活动”应用于正确的导航元素的最佳方法是什么?

Note: I am using Iron Router 注意:我正在使用Iron Router

Assuming you're using Iron Router, it's definitely Iron Router Active . 假设您使用的是Iron Router,那肯定是Iron Router Active I feel a bit guilty just providing a link to a package as the answer, but it is the best answer. 我只是提供一个指向软件包的链接而感到内,但这是最好的答案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM