Open
Description
We should mention that the site authors / component consumers would actively need to mark up one of the main navigation items as the active one as we couldn't determine it or even "just" define the first one as the default if none is defined, as this is totally up to the page or application it is integrated in.
We should even also mention the following aspects, that our developer colleagues would benefit from (at least for understanding the solution):
Example Angular: Set routerLink
as directive on <db-link>
. You'll retrieve the Active State out of the RouterLinkActive
directive:
<db-mainnavigation>
<db-link routerLink="/home" routerLinkActive #rlaHome="routerLinkActive" [current]="{ 'page' : rlaHome.isActive }">
Startseite
</db-link>
<db-link routerLink="/about" routerLinkActive #rlaAbout="routerLinkActive" [current]="{ 'page' : rlaAbout.isActive }">
About
</db-link>
</db-mainnavigation>