code: function iScrollService($rootScope, iScrollSignals) {
              var _state = {
                  useIScroll: defaultOptions.directive.initiallyEnabled,
                  autoDetectedUseNativeScroll: useNativeScroll
              };
  
              function _disable(signalOnly) {
                  if (!signalOnly) {
                      _state.useIScroll = false;
                  }
                  //$log.debug('emit(iScrollSignals.disabled)',
                  //    iScrollSignals.disabled);
                  $rootScope.$emit(iScrollSignals.disabled);
              }
  
              function _enable(signalOnly) {
                  if (!signalOnly) {
                      _state.useIScroll = true;
                  }
                  //$log.debug('emit(iScrollSignals.enabled)',
                  //    iScrollSignals.enabled);
                  $rootScope.$emit(iScrollSignals.enabled);
              }
  
              function _toggle(signalOnly) {
                  (_state.useIScroll ^ signalOnly) ?  // XOR
                      _disable(signalOnly) : _enable(signalOnly);
              }
  
              function _refresh(name) {
                  // The name parameter is not really used for now.
                  $rootScope.$emit(iScrollSignals.refresh, name);
              }
  
              return {
                  defaults: defaultOptions,
                  state: _state,
                  versionCompare: versionCompare,
                  platform: platform,
                  enable: _enable,
                  disable: _disable,
                  toggle: _toggle,
                  refresh: _refresh
              };
          }
docs: /* @ngInject