Bind all defined routes to `Parse.history`. We have to reverse the order of the routes here to support behavior where the most general routes can be defined at the bottom of the route map.
426212
function() {
      if (!this.routes) { 
        return;
      }
      var routes = [];
      for (var route in this.routes) {
        if (this.routes.hasOwnProperty(route)) {
          routes.unshift([route, this.routes[route]]);
        }
      }
      for (var i = 0, l = routes.length; i < l; i++) {
        this.route(routes[i][0], routes[i][1], this[routes[i][1]]);
      }
    }
903452
protected function defineRoutes()
    {
        if (!$this->app->routesAreCached()) {
            $router = app('router');
            $this->defineWebRoutes($router);
            $this->defineApiRoutes($router);
        }
    }
968610
public function map()
    {
        Route::namespace($this->namespace)->group(function (Router $router) {
            /*
             * API routes
             */
            $router->middleware('api')->prefix('api')->group(function (Router $router) {
                $router->middleware('auth:api')->group(function (Router $router) {
                    $router->get('history', 'ApiController@index')->middleware('can:see-history');
                    $router->delete('history', 'ApiController@destroy')->middleware('can:clear-history');
                });
            });
        });
    }
205413
function () {
      var history = _emberMetalProperty_get.get(this, 'history') || window.history;
      _emberMetalProperty_set.set(this, 'history', history);

      if (history && 'state' in history) {
        this.supportsHistory = true;
      }

      this.replaceState(this.formatURL(this.getURL()));
    }
800591
function () {
            var fragment;

            if (this.runsInBrowser()) {

                if (this.$.useState) {
                    fragment = (window.history.state || {}).fragment || "";
                } else {
                    fragment = decodeURI(window.location.hash);
                }

            } else {
                fragment = this.$history[this.$history.length - 1] || "";
            }

            return fragment.replace(routeStripper, '');
        }
483237
function removeRoutes(app) {
  return function (api, done) {
    if (!api) {
      done(null, false); // no routes to remove
      return
    }

    var removedRoutes = _.remove(app._router.stack, function (layer) {
      if (layer.route == undefined) {
        return false;
      } else {
        return api.matchesRoute(layer.route.path, layer.route.methods);
      }
    });

    if (removedRoutes && removedRoutes.length > 0) {
      console.log(`removed ${removedRoutes.length} routes`);
    }

    done(null, api);
  }
}
828418
function() {
        var hist = $.mobile.navigate.history;

        if ( this._isCloseable ) {
            this._isCloseable = false;
            // If the hash listening is enabled and there is at least one preceding history
            // entry it's ok to go back. Initial pages with the dialog hash state are an example
            // where the stack check is necessary
            if ( $.mobile.hashListeningEnabled && hist.activeIndex > 0 ) {
                $.mobile.back();
            } else {
                $.mobile.pageContainer.pagecontainer( "back" );
            }
        }
    }
670123
function(route, name, callback) {
            if (_.isObject(route) && _.isRegExp(route) == false) {
                _.each(route, function(callback, route) {
                    this.route(route, callback, callback);
                }, this);
                return this;
            }

            if (!_.isRegExp(route)) route = Router.routeToRegExp(route);
            logging.log("add route ", name, route);

            History.route(route, _.bind(function(url) {
                var args = Router.extractParameters(route, url);
                logging.log("route callback ", url, name, args);
                callback && callback.apply(this, args);
                this.trigger.apply(this, ['route:' + name].concat(args));
            }, this));

            return this;
        }
722773
def map ref,route, options={}
      context = Context.collection[get_context]
      context.routes[ref]= Route.new(route, context,options)
    end
883780
function(route) {
        return (route != null && self.routes != null && typeof(self.routes[route]) != 'undefined' && self.routes[route] != null)
    }
936706
function (methods) {
    this.lazyRouter();
    this.router.method(methods);
    utils.arrayify(methods).forEach(function (method) {
      this.define(method, function(path) {
        var route = this.router.route(path);
        var args = [].slice.call(arguments, 1);
        route[method].apply(route, args);
        return this;
      }.bind(this));
    }.bind(this));
  }
226190
function(req) {
        var args = utils.arg2arr(arguments), index = -1;
        var allHandlers = this._handlers.concat(this._lastHandlers);
        var next = function(error) {
            var item = allHandlers[++index];
            if (item) {
                var matched = false;
                if (utils.isString(item.routeExp)) {
                    matched = req.url.indexOf(item.routeExp) === 0;
                } else if (utils.type(item.routeExp) === 'regexp') {
                    matched = item.routeExp.test(parse(req.url).pathname);
                }
                //
                if (matched) {
                    var clone = args.concat();
                    if (error) { clone.push(error); }
                    item.handler.apply(null, clone);
                }
            }
        };
        args.push(next);
        next();
    }
1264005
def put(self, route: str(), callback: object()):
        
        self.__set_route('put', {route: callback})
        return RouteMapping
263772
function(route) {

    // Save the previous route value
    this._previousRoute = this._currentRoute;

    // Fetch Resources
    document.body.classList.add("loading");
    return this._fetchResource(route, this.config.container).then(function(res){
      document.body.classList.remove('loading');
      return res;
    });
  }
336614
@Bind(aggregate = true, optional = true)
    public synchronized void bindController(Controller controller) {
        LOGGER.info("Adding routes from " + controller);

        List<Route> newRoutes = new ArrayList<>();
        try {

            List<Route> annotatedNewRoutes = RouteUtils.collectRouteFromControllerAnnotations(controller);
            newRoutes.addAll(annotatedNewRoutes);
            newRoutes.addAll(controller.routes());

            //check if these new routes don't pre-exist
            ensureNoConflicts(newRoutes);

        } catch (RoutingException e) {
            LOGGER.error("The controller {} declares routes conflicting with existing routes, " +
                    "the controller is ignored, reason: {}", controller, e.getMessage(), e);
            // remove all new routes as one has failed
            routes.removeAll(newRoutes);  //NOSONAR
        } catch (Exception e) {
            LOGGER.error("The controller {} declares invalid routes, " +
                    "the controller is ignored, reason: {}", controller, e.getMessage(), e);
            // remove all new routes as one has failed
            routes.removeAll(newRoutes); //NOSONAR
        }
    }
247798
function _addRouteRecord(route, parent, exclude = false, ancestors = []) {
    const { path, name, handler } = route;
    const finalPath = _normalizePath(path, parent, ancestors);

    // Push path into ancestors array
    ancestors.push(path);

    const record = {
        name,
        parent,
        handler,
        path: finalPath,
        regex: PathToRegexp(finalPath),
        // redirect, TODO: Look into redirect functionality further
        before: route.before,
        init: route.init,
        update: route.update,
        after: route.after,
        unload: route.unload,
        pop: route.pop,
        meta: route.meta || {},
    };

    // Children should be mapped before parent in case of wildcard in parent
    if (route.children && route.children.length) {
        let i = 0;
        const length = route.children.length;

        for (; i < length; i++) {
            _addRouteRecord(route.children[i], route, exclude, ancestors);

            // After record is added, pop last ancestor off for the next set of paths
            ancestors.pop();
        }
    }

    // Exclude from main mapping/return created route record object
    if (exclude) {
        return record;
    }

    if (! pathMap[record.path]) {
        pathList.push(record.path);
        pathMap[record.path] = record;
    }

    if (name && ! nameMap[name]) {
        nameMap[name] = record;
    }
}
792948
function setRoutesInState(routes) {
    const routesByName = {};
    routes.forEach(route => {
        routesByName[route.name] = route.route;
    });
    return routesByName;
}