code: function disconnectController($scope, $rootScope, $window) {
  
      /**
       * Default settings
       */
      const DEFAULT_HEADING = "Browsersync";
      const DEFAULT_MESSAGE = "Disconnected";
  
      $scope._disconnected = false;
  
      /**
       * Default state
       * @type {{visible: boolean, status: string, heading: string, text: string}}
       */
      $scope.ui = {
          visible: false,
          heading: DEFAULT_HEADING,
          message: DEFAULT_MESSAGE
      };
  
      /**
       * @type {{connection: Function, disconnect: Function}}
       */
      $scope.socketEvents = {
          connection: function () {
              if ($scope._disconnected) {
                  $window.location.reload(true);
              }
              $scope.ui.visible = false;
              $scope.$digest();
          },
          disconnect: function () {
              $scope._disconnected = true;
              $scope.ui.visible = true;
              $scope.$digest();
          }
      };
  
      $rootScope.$on("ui:connection", $scope.socketEvents.connection);
      $rootScope.$on("ui:disconnect", $scope.socketEvents.disconnect);
  }
docs: Disconnect
  @param $scope
  @param $rootScope
  @param $window