Adding routerLink cancels PrimeNG formatting

UI Components for Angular
Post Reply
morsagmon
Posts: 5
Joined: 19 Jul 2023, 20:39

04 Aug 2023, 14:13

Hello team.

If I add to this code:

Code: Select all

<a *ngIf="!entry.hidden"  pRipple class="flex px-0 lg:px-5 py-3 hover:text-blue-600 font-medium transition-colors transition-duration-150 cursor-pointer">
                  <i class="{{ entry.icon }}"></i>
                  <span>{{ entry.label }}</span>
              </a>
...a routerLink directive:

Code: Select all

<a *ngIf="!entry.hidden" routerLink="{{ entry.routerLink }}"  pRipple class="flex px-0 lg:px-5 py-3 hover:text-blue-600 font-medium transition-colors transition-duration-150 cursor-pointer">
                  <i class="{{ entry.icon }}"></i>
                  <span>{{ entry.label }}</span>
              </a>
Some of the PrimeNG formatting derived from its classes are over-written by the default href formatting: the text becomes blue with an underline.

Any ideas how I can retain the complete formatting of this as it came from Prime Blocks - a top navigation block?

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests