You can create your own pipe. That is better solution.
@Pipe({
name: 'somepipe',
})
export class SomePipe {
transform(objects: any[]): any[] {
if(objects) {
return objects.filter(object => {
return object.data.type === 1;
});
}
}
}
and use it in html in this way: