MCPcopy
hub / github.com/angular/angular / resetConfig

Method resetConfig

packages/router/src/router.ts:388–392  ·  view source on GitHub ↗

* Resets the route configuration used for navigation and generating links. * * @param config The route array for the new configuration. * * @usageNotes * * ```ts * router.resetConfig([ * { path: 'team/:id', component: TeamCmp, children: [ * { path: 'simple', component:

(config: Routes)

Source from the content-addressed store, hash-verified

386 * ```
387 */
388 resetConfig(config: Routes): void {
389 (typeof ngDevMode === 'undefined' || ngDevMode) && validateConfig(config);
390 this.config = config.map(standardizeConfig);
391 this.navigated = false;
392 }
393
394 /** @docs-private */
395 ngOnDestroy(): void {

Calls 2

validateConfigFunction · 0.90
mapMethod · 0.80