diff --git a/src/app/shared/pipes/app.pipe.ts b/src/app/shared/pipes/app.pipe.ts index 37de47a2..4c0df47f 100644 --- a/src/app/shared/pipes/app.pipe.ts +++ b/src/app/shared/pipes/app.pipe.ts @@ -1,4 +1,4 @@ -import { Pipe, PipeTransform } from '@angular/core'; +import { NgModule, Pipe, PipeTransform } from '@angular/core'; @Pipe({ name: 'removeleadingzeros' @@ -25,7 +25,7 @@ export class CamelCasePipe implements PipeTransform { @Pipe({ name: 'camelCaseWithSpaces' }) -export class CamelCase implements PipeTransform { +export class CamelCaseWithSpacesPipe implements PipeTransform { transform(value: string, arg1?: string, arg2?: string): string { return value.replace(/(?:^\w|[A-Z]|\b\w)/g, (word, index) => (' ' + word.toUpperCase())); diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index 348252f7..a9f8eb20 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -103,7 +103,7 @@ import { AutoFocusDirective } from './directive/auto-focus.directive'; import { MonthlyDateDirective, YearlyDateDirective } from './directive/date-formats.directive'; import { MaxValidator } from './directive/max-amount.directive'; import { MinValidator } from './directive/min-amount.directive'; -import { RemoveLeadingZerosPipe, CamelCasePipe, CamelCaseWithReplacePipe, CamelCase } from './pipes/app.pipe'; +import { RemoveLeadingZerosPipe, CamelCasePipe, CamelCaseWithReplacePipe, CamelCaseWithSpacesPipe } from './pipes/app.pipe'; const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: false, @@ -229,7 +229,7 @@ export const DEFAULT_DATE_FORMAT: MatDateFormats = { RemoveLeadingZerosPipe, CamelCasePipe, CamelCaseWithReplacePipe, - CamelCase, + CamelCaseWithSpacesPipe, MaxValidator, MinValidator, AppSettingsComponent, @@ -304,7 +304,7 @@ export const DEFAULT_DATE_FORMAT: MatDateFormats = { RemoveLeadingZerosPipe, CamelCasePipe, CamelCaseWithReplacePipe, - CamelCase, + CamelCaseWithSpacesPipe, AuthSettingsComponent, TransactionsReportTableComponent, OnChainGeneratedAddressComponent, @@ -341,7 +341,7 @@ export const DEFAULT_DATE_FORMAT: MatDateFormats = { { provide: DateAdapter, useClass: DefaultDateAdapter }, { provide: MAT_DATE_FORMATS, useValue: DEFAULT_DATE_FORMAT }, { provide: OverlayContainer, useClass: ThemeOverlay }, - DecimalPipe, TitleCasePipe, DatePipe + DecimalPipe, TitleCasePipe, DatePipe, RemoveLeadingZerosPipe, CamelCasePipe, CamelCaseWithReplacePipe, CamelCaseWithSpacesPipe ] }) export class SharedModule { }