<!DOCTYPE html>
<html ng-app="demoApp">
<head>
    <title id="Description">jqxRangeSelector directive for AngularJS</title>
    <link rel="stylesheet" type="text/css" href="../../jqwidgets/styles/jqx.base.css" />
    <script type="text/javascript" src="../../scripts/angular.min.js"></script>
    <script type="text/javascript" src="../../scripts/jquery-1.11.1.min.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxdata.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxbuttons.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxcheckbox.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxrangeselector.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxangular.js"></script>
    <script type="text/javascript" src="../../scripts/demos.js"></script>
    <script type="text/javascript">
        var demoApp = angular.module("demoApp", ["jqwidgets"]);

        demoApp.controller("demoController", function ($scope) {
            // set range.
            $scope.rangeSelection = { from: 10, to: 50 };
            // prepare jqxRangeSelector's settings.
            $scope.rangeSelectorSettings = { width: 750, height: 100, min: 0, max: 200, range: $scope.rangeSelection, majorTicksInterval: 10, minorTicksInterval: 1 };
            // set range.
            $scope.setRange = function () {
                $scope.rangeSelection = { from: 30, to: 150 };
            }
        });
    </script>
</head>
<body>
    <div ng-controller="demoController">
        <jqx-range-selector jqx-settings="rangeSelectorSettings" ng-model="rangeSelection"></jqx-range-selector>
        <br /><br />
        From: {{rangeSelection.from}}
        <br />
        To: {{rangeSelection.to}}
        <br /><br />
        <jqx-button ng-click="setRange()">Set Range</jqx-button>
    </div>
</body>
</html>
