Israel Lavi | 1994c98 | 2018-05-21 17:42:00 +0300 | [diff] [blame] | 1 | import { Pipe, PipeTransform } from '@angular/core'; |
2 | |||||
3 | @Pipe({name: 'keys'}) | ||||
4 | export class KeysPipe implements PipeTransform { | ||||
5 | transform(value, args:string[]) : any { | ||||
6 | let keys = []; | ||||
7 | for (let key in value) { | ||||
8 | keys.push(key); | ||||
9 | } | ||||
10 | return keys; | ||||
11 | } | ||||
12 | } | ||||
13 |