var slider = document.getElementById('test5');
noUiSlider.create(slider, {
start: [1366],
step: 1,
range: {
'min': 200,
'max': 1920
},
format: wNumb({
decimals: 0,
postfix: 'px',
})
});
var app = angular.module('myApp', []);
app.controller('myWidth', function ($scope) {
$scope.width = inputFormat.value;
$scope.$watch('width', function (newValue, oldValue) {
console.log('Old:' + oldValue);
console.log('New:' + newValue);
});
console.log($scope.width + ' - scope width');
});
var inputFormat = document.getElementById('input-format');
editorContainer = document.getElementById('editorContainer');
slider.noUiSlider.on('update', function (values, handle) {
inputFormat.value = values[handle];
//$(editorContainer).css('width', values[handle]);
});
inputFormat.addEventListener('change', function(){
slider.noUiSlider.set(this.value);
});
var slider = document.getElementById('test5');