docs: function (navigationInstruction, callbackName, next, ignoreResult) {
          var plan = navigationInstruction.plan;
          var infos = findDeactivatable(plan, callbackName);
          var i = infos.length; // query from inside out
          function inspect(val) {
              if (ignoreResult || shouldContinue(val)) {
                  return iterate();
              }
              return next.cancel(val);
          }
          function iterate() {
              if (i--) {
                  try {
                      var viewModel = infos[i];
                      var result = viewModel[callbackName](navigationInstruction);
                      return processPotential(result, inspect, next.cancel);
                  }
                  catch (error) {
                      return next.cancel(error);
                  }
              }
              navigationInstruction.router.couldDeactivate = true;
              return next();
          }
          return iterate();
      }