Here is an example of what I have: my code.
I tried to make my LoginComponent
to be my "empty" path, and to appear without a specific router name in my URL, and it is working. Although, he still appears as the active
route, I even putted pathMatch: 'full'
, but didn't work...
Does anyone know how I can fix this?
You are running in to the problem that angular router resolves /
as an path, and that exists in /Catalog
.
You can use [routerLinkActiveOptions]="{exact: true}"
on your login a tag, making it.
<a routerLinkActive="active"
[routerLinkActiveOptions]="{exact: true}"
routerLink="">Login</a>