Apply CSS to active router link [Angular 2]

后端 未结 3 1706
面向向阳花
面向向阳花 2021-01-18 10:34

I would like to apply special CSS style properties to active router links:

3条回答
  •  太阳男子
    2021-01-18 11:13

    Without knowing anything more, this is the direction I would point you in.

    If routerLink.something === something, or whatever expression you want, evaluates to true, the class (and styling) will be applied.

提交回复
热议问题