src/directive.js
function setOptionsWatcher(api) {
      scope.$watch('options', (newOptions, oldOptions) => {
        if (angular.equals(newOptions, oldOptions)) {
          return;
        }

        options = angular.copy(scope.options);

        api.updateOptions(options);
      });
    }
function setOptionsWatcher(api) {
      scope.$watch('options', (newOptions, oldOptions) => {
        if (angular.equals(newOptions, oldOptions)) {
          return;
        }

        options = angular.copy(scope.options);

        api.updateOptions(options);
      });
    }
Creates a watcher that looks for changes in the `slider-options` directive attribute. When a
change is detected the options for the noUiSlider instance are updated. Note that only the
'margin', 'limit', 'step', 'range', 'animate' and 'snap' options can be updated this way (as
documented in https://refreshless.com/nouislider/more/#section-update). All other option
updates require you to destroy the current instance and create a new one.

@param {Object} api The API instance returned by the `noUiSlider.create()` method