Import
import { BbIbanPipeModule } from '@backbase/ui-ang/iban-pipe'
Usage
Use the bbIban pipe to format IBAN numbers. The pipe applies the global IBAN format configuration to segment the value with spaces.
<!-- Basic IBAN formatting -->
<p>{{ 'NL81TRIO0212471066' | bbIban }}</p>
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
value (required) |
string |
The IBAN number to format |
value
The value parameter accepts the IBAN number to be formatted. It can be alphanumeric or numeric.
<!-- Alphanumeric IBAN -->
<p>{{ 'NL81TRIO0212471066' | bbIban }}</p>
<!-- Numeric value -->
<p>{{ '569873 1' | bbIban }}</p>
Global configuration
The IBAN pipe uses the ACCOUNTS_DISPLAYING_FORMAT injection token to determine the segment pattern for formatting. This is the same token used by the Account Number Pipe.
If no global configuration is provided for the IBAN type, the default segment size is 4.
import { ACCOUNTS_DISPLAYING_FORMAT } from '@backbase/ui-ang/account-number-pipe';
const accountsFormatConfig = {
iban: { segments: [4, 4, 4, 4, 4, 4] }
};
@NgModule({
providers: [
{ provide: ACCOUNTS_DISPLAYING_FORMAT, useValue: accountsFormatConfig }
]
})
export class AppModule {}