Hi,
I am trying to use the Slider widget with AngularJS.
I want to bind the enabled state of the slider to my scope.
I have used :
<div id="example" ng-app="KendoDemos">
<div class="demo-section k-content" ng-controller="MyCtrl">
<div style="position: relative; width: 300px; height: 300px; overflow: visible; margin: 0 auto;">
<div kendo-slider ng-model="width" k-tooltip="{ enabled: false }"
style="position: absolute; left: 25px; bottom: 0; width: 270px;"></div>
<div kendo-slider ng-model="height" k-tooltip="{ enabled: false }" k-orientation="'vertical'"
style="position: absolute; bottom: 25px; left: 0; height: 270px;" k-enabled="{{vEnabled}}"></div>
<img style="position: absolute; left: 60px; bottom: 60px;
width: {{100 + width * 10}}px;
height: {{100 + height * 10}}px;"
src="../content/shared/images/foods/200/72.jpg" />
</div>
<input type="checkbox" ng-model="vEnabled" />
vEnabled:{{vEnabled}}
</div>
<style scoped>
.demo-section {
width: 300px;
}
</style>
</div>
<script>
angular.module("KendoDemos", [ "kendo.directives" ]);
function MyCtrl($scope) {
$scope.width = 0;
$scope.height = 0;
$scope.vEnabled = true;
}
</script>
The enabled state bound to "vEnabled" is correctly taken at startup, but when changed is not live.
Do I have a correct usage ?
Thanks.
I am trying to use the Slider widget with AngularJS.
I want to bind the enabled state of the slider to my scope.
I have used :
<div id="example" ng-app="KendoDemos">
<div class="demo-section k-content" ng-controller="MyCtrl">
<div style="position: relative; width: 300px; height: 300px; overflow: visible; margin: 0 auto;">
<div kendo-slider ng-model="width" k-tooltip="{ enabled: false }"
style="position: absolute; left: 25px; bottom: 0; width: 270px;"></div>
<div kendo-slider ng-model="height" k-tooltip="{ enabled: false }" k-orientation="'vertical'"
style="position: absolute; bottom: 25px; left: 0; height: 270px;" k-enabled="{{vEnabled}}"></div>
<img style="position: absolute; left: 60px; bottom: 60px;
width: {{100 + width * 10}}px;
height: {{100 + height * 10}}px;"
src="../content/shared/images/foods/200/72.jpg" />
</div>
<input type="checkbox" ng-model="vEnabled" />
vEnabled:{{vEnabled}}
</div>
<style scoped>
.demo-section {
width: 300px;
}
</style>
</div>
<script>
angular.module("KendoDemos", [ "kendo.directives" ]);
function MyCtrl($scope) {
$scope.width = 0;
$scope.height = 0;
$scope.vEnabled = true;
}
</script>
The enabled state bound to "vEnabled" is correctly taken at startup, but when changed is not live.
Do I have a correct usage ?
Thanks.