code: function(state, length) {
          if(state && !this.previous.active) {
              this.previous.activate();
          } else if(!state && this.previous.active) {
              this.previous.deactivate();
          }
      }
docs: Method: onPreviousChange
  Called when the previous history stack changes.
  
  Parameters:
  state - {Object} An object representing the state to be restored
  if previous is triggered again or null if no previous states remain.
  length - {Integer} The number of remaining previous states that can
  be restored.