Hi I am trying to round the number I calculated to thousand's place.
For example, If I got 545,000 I want it to be 550,000
I created a pipe
import {Pipe, PipeTransform} from '@angular/core';
@Pipe({name: 'round'})
export class RoundPipe implements PipeTransform {
transform(value: number): number {
return Math.round(value);
}
}
Doesn't seem to work
Any idea?
Math.round(value)
) to fit all special cases.