ng2-nouislider
ng2-nouislider copied to clipboard
not updating model
Hi,
I have use-case: when range is changed, also change ngModel to [min,max]. But I always have to click twice, first time range is updated and then ngModel. This is how I use it:
<div class="format-slider">
<nouislider [config]="upperConfig"
[step]="step"
[min]="mRangeChosen[0]"
[max]="mRangeChosen[1]"
(change)="onChange($event)"
[ngModel]="mRangeChosen" ></nouislider>
<app-timeline-scale [min]="mRangeChosen[0]" [max]="mRangeChosen[1]"></app-timeline-scale>
</div>
Here is live demo and Here is source. Problem is when you enlarge chosen range in upper-slider. This method in your code is called twice, but in wrong order and I don't know how to force timeline to put handle to right position, because in model the value is correct but handle is rendered on bad position.
Looking forward to your reply, thank you
This is how I partially solved it.
I have the same scenario, @piskula were you able to find the solution?