Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 644 Bytes

README.md

File metadata and controls

15 lines (11 loc) · 644 Bytes

angular-2-pipes

i have created several angular 2 pipes dealing with JSON arrays

1- filter : which can be used to filter the array by property
{{posts | filter:'userId':1 json }}
filter : the pipe
first arg is the property name
second arg is the value

2- select filter: which can be used to select multi proprties from the array object
{{posts | select:'userId':'title' | json }}

to use pipes you need to add those files into your project then import the pipe into your component and declare it in you app module https://angular.io/docs/ts/latest/guide/pipes.html