Open MartineFrancken opened 11 years ago
Hi,
if you set klantH='true'
this also works with <option>
s. See this fiddle: http://jsfiddle.net/4AEQK/10/
Using ng-options
seems to work correctly, as far as I can tell: http://jsfiddle.net/4AEQK/11/
Could you create a js fiddle that reproduces your problem?
Thanks, Tobias
I've tried using the selectfield in the following way:
`
`
If I set klantH on true, the slider will still be set on false (Nee). My goal is to have 'Ja' (true) as default when opening the page.
I am able to achieve this by using ng-options:
<select id="sliderH" name='sliderH' data-role="slider" ng-model="klantH" ng-options="kh.label for kh in khOpties"> </select>
with
$scope.khOpties = [ { label : 'Nee', value : false }, { label : 'Ja', value : true }]
and$scope.klantH = $scope.khOpties[1];
It does set the right option in the slider, but I do lose a lot of mark-up. I don't see the labels and the color for the true-value isn't different from the false-value.
How can I set the slider on 'true' with the right rendering of slider?