I am getting this error Cannot read property 'filter' of null
when I apply filter in angular 2 .here is my code
http://plnkr.co/edit/K46jJsnmHiONuqIsnuzW?p=preview
import {Pipe} from 'angular2/core';
@Pipe({
name: 'sortByName',
pure: false,
})
export class SortByNamePipe {
transform (value, [queryString]) {
// console.log(value, queryString);
return value.filter((student)=>new RegExp(queryString).test(student.name))
// return value;
}
}