Here is the HTML input code that I am using:
<input class="number " type= "text" pInputText [readonly]="" formControlName="id" [required]="" plmNumberFormatter [value]="data?.id | numberPipe" />
However, when I place the cursor on the input field, it displays 'undefined' as its value.
This is the TypeScript code snippet:
ngOnInit() {
this.form = this.createForm();
this.keys.split(',').forEach(item => {
set(this.data, item, null);
});
Additionally, this is the code for my custom pipe:
transform(value: number | string, fractionSize?: number): string {
const numberValue = transformToNumber(value, this.profile.getCurrentProfile());
let retNumber = Number(numberValue);
return this.decimalPipe.transform(retNumber, this.profile.getDigitsInfo(), this.profile.getLocale());
}
I am facing an issue where the input value is not displaying correctly. Can you help me identify the problem?
Angular version being used: 7.3.9