[Solved] Angular 2 – how round calculated number?

[ad_1]

You need another pipe to do this

import {Pipe} from 'angular2/core';

@Pipe({name: 'round'})
export class RoundPipe {
  transform (input:number) {
    return Math.floor(input);
  }
}

template:

{{ date | amDifference : item.startdate : 'minutes' : true | round }}

4

[ad_2]

solved Angular 2 – how round calculated number?