@Pipe({name: 'round'}) export class RoundPipe implements PipeTransform { /** * * @param value * @returns {number} */ transform(value: number): number { // return Math.round(value); return parseFloat(value.toFixed(2)); } }
@Pipe({name: 'round'}) export class RoundPipe implements PipeTransform { /** * * @param value * @returns {number} */
transform(value: number): number { // return Math.round(value);
return parseFloat(value.toFixed(2)); } }