MCPcopy
hub / github.com/angular/angular / sortByMatchingOutlets

Function sortByMatchingOutlets

packages/router/src/utils/config.ts:237–241  ·  view source on GitHub ↗
(routes: Routes, outletName: string)

Source from the content-addressed store, hash-verified

235 * The order of the configs is otherwise preserved.
236 */
237export function sortByMatchingOutlets(routes: Routes, outletName: string): Routes {
238 const sortedConfig = routes.filter((r) => getOutlet(r) === outletName);
239 sortedConfig.push(...routes.filter((r) => getOutlet(r) !== outletName));
240 return sortedConfig;
241}

Callers 1

processChildrenMethod · 0.90

Calls 3

getOutletFunction · 0.85
filterMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…