I would expect the following expression to have the same result:
Case 1:
<input type="range" name="myRangeInput" ng-model="value.rangeInput" value="value.rangeInput" min="-55" max="55">
Case 2 (the difference with case 1 is that I replaced 55 AngularJS scope variables):
<input type="range" name="myRangeInput" ng-model="value.rangeInput" value="value.rangeInput" min="{{value.rangeInputMin}}" max="{{value.rangeInputMax}}">
with value.rangeInputMax is 55, and value.rangeInputMin is -55.
But they do not have the same solution. For example, let value.rangeInput say value.rangeInput in both cases. Then, in the first example, the point in the range slider is set to -10. But in the second example, the point is set to 0. I tried to convert value.rangeInputMin and value.rangeInputMax to numbers and change the instruction (without double quotes):
<input type="range" name="myRangeInput" ng-model="value.rangeInput" value="value.rangeInput" min={{value.rangeInputMin}} max={{value.rangeInputMax}}>
I also tried with various notations, for example. value.rangeInputMin, "value.rangeInputMin", tried to set it using ng-init, create another scope variable and assign a value to that, etc.
But he still shows a different behavior than in the first case.
source share