I am creating a project which uses a HTTP get from a web service and returns an array of projects, with ID, name, description etc.
There is many projects within thi
you could use a pipe
to filter those projects based on your condition (that passes only for those 'unique ids') and apply them on your *ngFor
in the template like this,
Define the pipe like this,
@Pipe({
name: 'uniqueOnes'
})
export class UniqueOnesPipe implements PipeTransform {
uniqueIds = [ 'id1', 'id2', 'id5'];
transform(value: any): any {
return value
? value.filter(project => { return })
: value;
}
}
More on pipes here.