在我的站点中,想要为不同的routes
设置活动链接。
<li routerLinkActive="active" [routerLinkActiveOptions]="{exact: true}">
<a [routerLink]="['/test/']" title="Create">Create</a>
</li>
我想将create
设置为网址/test
,/test2
,/engagement
的活动菜单
是否有可能添加or condition effect
答案 0 :(得分:0)
我会使用类似https://github.com/ngrx-utils/ngrx-utils#routerlinkmatch-directive的名称,这样您就可以指定正则表达式来选择要激活的链接。
另一种解决方案可能是将这3条路由嵌套到一条父路由中,并给其提供assets:/your_plugin_name/qmldir
指令,以便所有3条路由都将变为活动状态。