docs: function initLocalsStepFactory($componentMapper, $controllerIntrospector) {
    return function initLocals(instruction) {
      return instruction.router.traverseInstruction(instruction, function(instruction) {
        if (typeof instruction.component === 'function') {
          instruction.controllerConstructor = instruction.component;
        } else {
          var controllerName = $componentMapper.controllerName(instruction.component);
          if (typeof controllerName === 'function') {
            instruction.controllerConstructor = controllerName;
          } else {
            instruction.controllerConstructor = $controllerIntrospector.getTypeByName(controllerName) || NOOP_CONTROLLER;
          }
        }
        return instruction.locals = {
          $router: instruction.router,
          $routeParams: (instruction.params || {})
        };
      });
    }
  }