ng-ytl-zorro-antd
Version:
An enterprise-class UI components based on Ant Design and Angular
22 lines (19 loc) • 1 kB
text/typescript
import { Component } from '@angular/core';
export class NzDemoInputNumberFormatterComponent {
demoValue = 100;
formatterPercent = value => `${value}%`;
parserPercent = value => value.replace('%', '');
formatterDollar = value => `$${value}`;
parserDollar = value => value.replace('$', '');
formatterInt = value => value ? parseInt(value , 10) : '';
parserInt = value => parseInt(value, 10);
}