I have a link to helper that generate a <span>
. The <span>
should:
我有一个生成的帮助器链接。 应该:
- have the class:"arrow open" when it is active.
- 有活动的类:“箭头打开”。
-
have the class:"arrow" when it is NOT active.
当它不活动时,使用类:“箭头”。
{{#link-to 'status' tagName="span" activeClass="arrow open"}} {{/link-to}}
{{#link-to'status'tagName =“span”activeClass =“arrow open”}} {{/ link-to}}
Question: The point 1 is working with the use of the activeClass. However, I don't how to assign a class when the link-to helper is not active as per the point 2.
问题:第1点正在使用activeClass。但是,当链接到帮助程序未按照第2点激活时,我不知道如何分配类。
tks
TKS
1 个解决方案
#1
1
Adapted from the guides:
改编自指南:
{{#link-to 'status' tagName='span' class='arrow' activeClass='open'}} {{/link-to}}
The class
property lets you set the class that will be present at all times.
class属性允许您设置将始终存在的类。
#1
1
Adapted from the guides:
改编自指南:
{{#link-to 'status' tagName='span' class='arrow' activeClass='open'}} {{/link-to}}
The class
property lets you set the class that will be present at all times.
class属性允许您设置将始终存在的类。