I made a Pipe as follow:
import {Pipe, PipeTransform} from '@angular/core';
import { Radio } from '../../models/radio';
@Pipe({
name: 'radioFilter'
})
export class radioFilterPipe implements PipeTransform {
transform(value: Radio[], args: string[]): any {
let filter = args[0].toLocaleLowerCase();
return filter ? value.filter(radio => radio.station.text.toLocaleLowerCase().indexOf(filter) != -1) : value;
}
}
and in my component I added the following code:
import { radioFilterPipe } from './grid.station.pipe';
// pipes: [radioFilter],
but I get a compile error:
error TS2304: Cannot find name 'radioFilter'. What am I doing wrong??