aboutsummaryrefslogtreecommitdiffstats
path: root/webapp/src/app/@theme/pipes/round.pipe.ts
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/src/app/@theme/pipes/round.pipe.ts')
-rw-r--r--webapp/src/app/@theme/pipes/round.pipe.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/webapp/src/app/@theme/pipes/round.pipe.ts b/webapp/src/app/@theme/pipes/round.pipe.ts
new file mode 100644
index 0000000..3ec880f
--- /dev/null
+++ b/webapp/src/app/@theme/pipes/round.pipe.ts
@@ -0,0 +1,9 @@
+import { Pipe, PipeTransform } from '@angular/core';
+
+@Pipe({ name: 'ngxRound' })
+export class RoundPipe implements PipeTransform {
+
+ transform(input: number): number {
+ return Math.round(input);
+ }
+}