Persistence Support in EJ 1 Angular Slider
23 Oct 2017 / 1 minute to read
This feature supports you to save current model value to browser cookies for state maintenance. When you refresh the web page, the Slider control retains the model value apply from browser cookies. The data type of enablePersistence is Boolean type.
The following steps explain you on how to enable the enablePersistence property.
In an HTML page, add a <div> element to render it as a Slider widget.
<ej-slider id='defaultSlider' [type]='range' [enablePersistence]='isEnablePersistence'></ej-slider>
<script>
import { Component } from '@angular/core';
import { SliderModule } from '@syncfusion/ej2-ng-inputs';
@Component({
selector: 'control-content',
templateUrl: 'app/components/slider/slider.component.html'',
})
export class DefaultSliderComponent {
public enablePersistence: boolean = true,
public range: string ='range';
}
</script>
Execution of above code will render the below output
Change the handle values and refresh the page will shows the output like below.
Was this page helpful?
Yes
No
Thank you for your feedback!
Thank you for your feedback and comments. We will rectify this as soon as possible!
An unknown error has occurred. Please try again.
Help us improve this page