Fix hexadecimal conversion to show leading zeros.

Fixes #2805.
This commit is contained in:
hunicus 2022-12-07 00:03:57 -05:00
parent adc40e68e2
commit 4004c826de

View File

@ -5,6 +5,6 @@ import { Pipe, PipeTransform } from '@angular/core';
})
export class Decimal2HexPipe implements PipeTransform {
transform(decimal: number): string {
return `0x` + decimal.toString(16);
return `0x` + ( decimal.toString(16) ).padStart(8, '0');
}
}