The Data Doodle

A blog about visualizing, analyzing, and managing data

Angular Slider

Demo: [http://datadoodler.github.io/ts-06-angular-slider]

Source: [https://github.com/datadoodler/ts-06-angular-slider]

Both of these sliders are bound to the same object on the backend. (See object at bottom). The first display properly when rendered. The second needs to be forced by broadcasting an event on the rootscope.

1
2
3
4
5
6
7
8
9
function clickButton() {
this.showSpeedSlider = !this.showSpeedSlider;
if(this.forceRender){
// Force rendering at every iteration of the interval.
$interval(function () {
$rootScope.$broadcast('rzSliderForceRender');
}, 1,500, true, $rootScope)
}
};

For other examples of using rzslider, see [https://jsfiddle.net/ValentinH/954eve2L]