I have integrated angularJS with rzSlider to provide users the option of manually entering a number value or using the slider to input the value. However, I'm facing an issue where if a user drags the slider and then deletes the entire input from the field, the rzslider floor defaults to either undefined or NaN. To address this problem, I am utilizing a directive to render the HTML.
https://i.sstatic.net/K73KY.png https://i.sstatic.net/4k35J.png
Below is the snippet of HTML code:
'<div class="form-group position-relative mb-5">' +
'<label class="mb-3 calculatorLabel">How much are you looking to borrow? <a tabindex="0" data-toggle="popover" data-trigger="focus" title="How Much Can you Borrow" data-content="And here\'s some amazing content. It\'s very engaging. Right?"><i class="far fa-question-circle"></i></a></label>' +
'<input class="form-control form-control-lg text-transform-none" type="number" min="0" ng-required="true" title="Please Enter loan amount" maxlength="7" ng-model="model.autoLoan.borrowAmount">' +
'<rzslider rz-slider-model="model.autoLoan.borrowAmount" rz-slider-options="model.autoLoan.slider.borrowAmount.options"></rzslider>' +
'</div>' +