Hello there, I'm currently working on a search pipe in Angular 4 to filter company team sizes from JSON data using a range input between 0 and 100. However, I'm facing an issue with the range filter as I am relatively new to TypeScript and Angular 4. Any assistance would be greatly appreciated as I've tried some basic code but seem to have trouble grasping the logic.
Here is the Range Pipe -
@Pipe({
name: 'range'
})
export class CheckboxPipe implements PipeTransform {
transform(value: any, args?: any): any {
console.log('args', args);
return args
? value.filter(sal => { return sal.team })
: value;
}
}
Below is the Range Input box -
0 <input type="range" min="0" max="100"
[(ngModel)]="team" name="team" /> 100
And here is the list being filtered -
<div *ngFor="let joblist of jobList | range: team">
{{joblist.team}}
</div>