State Maintenance

28 Jun 20171 minute to read

Saves current model value to cookies for State Maintenance. While refreshing the ProgressBar widget, page retains the model value applied from browser cookies. By default, the enablePersistence property is set to ‘false’ in the ProgressBar.

The following steps explain the State Maintenance in the ProgressBar control.

In the HTML page, add a <div> element to render the ProgressBar widget.

  • HTML
  • <div class="control">
      <div id="progressbar" ej-progressbar e-enablepersistence="true" e-value="40" e-height="40" e-width="500" e-create="create">
  • angular.module('ProgressBarApp', ['ejangular'])
    .controller('ProgressBarCtrl', function ($scope) {
        $scope.create = function () {
            var progress = $("#progressbar").data("ejProgressBar");
            progress.setModel({ text: progress.getValue() + " %" });

    The following screenshot displays the output.