p>write routerLinkActive as bellow..remove those brackets <li> <a class="nav-link" [routerLink] = "['/']" routerLinkActive="active">Home</a> </li> <li> <a class="nav-link" [routerLink] = "['/login']" routerLinkActive="active">Login</a> </li>官方文档:- https://angular.io/guide/router 这篇关于RouterLink在Angular 6中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-12 15:12