MCPcopy Create free account
hub / github.com/angular/angular / resetConfig

Method resetConfig

packages/router/src/router.ts:398–402  ·  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

396 * ```
397 */
398 resetConfig(config: Routes): void {
399 (typeof ngDevMode === 'undefined' || ngDevMode) && validateConfig(config);
400 this.config = config.map(standardizeConfig);
401 this.navigated = false;
402 }
403
404 /** @docs-private */
405 ngOnDestroy(): void {

Calls 2

validateConfigFunction · 0.90
mapMethod · 0.80