I have my custom Angular library where I would like to implement ng2-nouislider in one of my components. Everything works fine but when I try to build my project I get this error:
error NG8007: The property and event halves of the two-way binding 'ngModel' are not bound to the same target.
The problem is that when I remove NgModel everything works like a charm. But with it - build fails with following error above. I am importing FormsModule in my main library module so I think it's not the case. I saw this question and people there come up with just copy-paste solution which I would like to avoid.
Code:
<nouislider class="day-slider"
[(ngModel)]="timeScheduleData[daySchedule.alias]"
[attr.id]="'slider_' + daySchedule.alias"
[config]="timeScheduleConfig"
[connect]="connectors[daySchedule.alias]"
[disabled]="disable"
(slide)="onSlide($event, daySchedule.alias)"
(end)="onChangeSlider($event, daySchedule.alias)"
(click)="onClickSlider($event, daySchedule.alias)">
</nouislider>
Any workarounds on this?
Versions:
- angular: 13.3.12
- ng-packagr: 13.3.1,
- ng2-nouislider: 1.8.3