I want to create a range filter in Angular. The user should not be able to enter a minimum value, which is smaller than the maximum input value.
HTML:
<input type="text" class="form-control" formControlName="from" [placeholder]="Minimum" />
<input type="text" class="form-control" formControlName="to" [placeholder]="Maximum" />
I'm not sure what to do. I guess I have to create two variables in the .ts-file (minValue and maxValue). And then check directly in the HTML with *ngIf, if the minValue is smaller than the maxValue and then send an error.
Does someone has an idea how to solve it properly? Thank you very much