Pipe Declaration

pull/1127/head
ShahanaFarooqui 2 years ago
parent 44321d62e5
commit b13e18a843

@ -1,4 +1,4 @@
import { Pipe, PipeTransform } from '@angular/core'; import { NgModule, Pipe, PipeTransform } from '@angular/core';
@Pipe({ @Pipe({
name: 'removeleadingzeros' name: 'removeleadingzeros'
@ -25,7 +25,7 @@ export class CamelCasePipe implements PipeTransform {
@Pipe({ @Pipe({
name: 'camelCaseWithSpaces' name: 'camelCaseWithSpaces'
}) })
export class CamelCase implements PipeTransform { export class CamelCaseWithSpacesPipe implements PipeTransform {
transform(value: string, arg1?: string, arg2?: string): string { transform(value: string, arg1?: string, arg2?: string): string {
return value.replace(/(?:^\w|[A-Z]|\b\w)/g, (word, index) => (' ' + word.toUpperCase())); return value.replace(/(?:^\w|[A-Z]|\b\w)/g, (word, index) => (' ' + word.toUpperCase()));

@ -103,7 +103,7 @@ import { AutoFocusDirective } from './directive/auto-focus.directive';
import { MonthlyDateDirective, YearlyDateDirective } from './directive/date-formats.directive'; import { MonthlyDateDirective, YearlyDateDirective } from './directive/date-formats.directive';
import { MaxValidator } from './directive/max-amount.directive'; import { MaxValidator } from './directive/max-amount.directive';
import { MinValidator } from './directive/min-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 = { const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
suppressScrollX: false, suppressScrollX: false,
@ -229,7 +229,7 @@ export const DEFAULT_DATE_FORMAT: MatDateFormats = {
RemoveLeadingZerosPipe, RemoveLeadingZerosPipe,
CamelCasePipe, CamelCasePipe,
CamelCaseWithReplacePipe, CamelCaseWithReplacePipe,
CamelCase, CamelCaseWithSpacesPipe,
MaxValidator, MaxValidator,
MinValidator, MinValidator,
AppSettingsComponent, AppSettingsComponent,
@ -304,7 +304,7 @@ export const DEFAULT_DATE_FORMAT: MatDateFormats = {
RemoveLeadingZerosPipe, RemoveLeadingZerosPipe,
CamelCasePipe, CamelCasePipe,
CamelCaseWithReplacePipe, CamelCaseWithReplacePipe,
CamelCase, CamelCaseWithSpacesPipe,
AuthSettingsComponent, AuthSettingsComponent,
TransactionsReportTableComponent, TransactionsReportTableComponent,
OnChainGeneratedAddressComponent, OnChainGeneratedAddressComponent,
@ -341,7 +341,7 @@ export const DEFAULT_DATE_FORMAT: MatDateFormats = {
{ provide: DateAdapter, useClass: DefaultDateAdapter }, { provide: DateAdapter, useClass: DefaultDateAdapter },
{ provide: MAT_DATE_FORMATS, useValue: DEFAULT_DATE_FORMAT }, { provide: MAT_DATE_FORMATS, useValue: DEFAULT_DATE_FORMAT },
{ provide: OverlayContainer, useClass: ThemeOverlay }, { provide: OverlayContainer, useClass: ThemeOverlay },
DecimalPipe, TitleCasePipe, DatePipe DecimalPipe, TitleCasePipe, DatePipe, RemoveLeadingZerosPipe, CamelCasePipe, CamelCaseWithReplacePipe, CamelCaseWithSpacesPipe
] ]
}) })
export class SharedModule { } export class SharedModule { }

Loading…
Cancel
Save