File

src/app/shared/pipes/round.pipe.ts

Metadata

Name round

Methods

transform
transform(value: any, precision: number)
Parameters :
Name Type Optional
value any No
precision number No
Returns : any
import { Pipe, PipeTransform } from '@angular/core';

import * as _ from 'lodash';

@Pipe({
  name: 'round'
})
export class RoundPipe implements PipeTransform {
  transform(value: any, precision: number): any {
    return _.round(value, precision);
  }
}

result-matching ""

    No results matching ""