Skip to content

Add case (capitalize, uppercase, lowercase) option to breadcrumb object #32

Answered by KBeDevel
KBeDevel asked this question in Q&A
Discussion options

You must be logged in to vote

@udayvunnam Nice! It works. But with a little fix. Replace info.case.upper with info.case === 'upper'

...},
{
  path: 'fooPath',
  component: fooComponent
  data: {
    breadcrumb: {
      info: {
        case: 'upper'
      }
    }
  }
},
...
<ng-container *xngBreadcrumbItem="let breadcrumb; let info = info">
  <ng-container *ngIf="!info">{{ breadcrumb | titlecase }}</ng-container>
  <ng-container *ngIf="info && info.case === 'upper'">{{ breadcrumb | uppercase }}</ng-container>
  <ng-container *ngIf="info && info.case === 'lower'">{{ breadcrumb | lowercase }}</ng-container>
</ng-container>

This worked for me. Thank you.

Replies: 6 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by udayvunnam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #32 on December 09, 2020 03:02.