Skip to content

Commit

Permalink
move docs for default-router-state-serializer to configuration.md
Browse files Browse the repository at this point in the history
  • Loading branch information
kanafghan committed Jun 2, 2019
1 parent b8aeb7a commit a1c1ee6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
6 changes: 5 additions & 1 deletion projects/ngrx.io/content/guide/router-store/configuration.md
Expand Up @@ -10,10 +10,14 @@ interface StoreRouterConfig {
</code-example>

- `stateKey`: The name of reducer key, defaults to `router`. It's also possible to provide a selector function.
- `serializer`: How a router snapshot is serialized. Defaults to `DefaultRouterStateSerializer` (see [Default Router State Serializer](guide/router-store/default-router-state-serializer)). See [Custom Router State Serializer](#custom-router-state-serializer) for more information.
- `serializer`: How a router snapshot is serialized. Defaults to `DefaultRouterStateSerializer` (see [Default Router State Serializer](#default-router-state-serializer)). See [Custom Router State Serializer](#custom-router-state-serializer) for more information.
- `navigationActionTiming`: When the `ROUTER_NAVIGATION` is dispatched. Defaults to `NavigationActionTiming.PreActivation`. See [Navigation Action Timing](#navigation-action-timing) for more information.
- `routerState`: Set this property to decide which serializer should be used, if none is provided, and the metadata on the dispatched action.

## Default Router State Serializer

If no router state serializer is provided through the [configuration](#configuration-options) of router store, the `DefaultRouterStateSerializer` is used. This router state serializer, serializes the URL together with the [ActivatedRouteSnapshot](https://angular.io/api/router/ActivatedRouteSnapshot) from [Angular Router](https://angular.io/guide/router). The latter is serialized recursively, but only with the possibility to traverse the route downward since `root` and `parent` parameters are set to `undefined`.

## Custom Router State Serializer

During each navigation cycle, a `RouterNavigationAction` is dispatched with a snapshot of the state in its payload, the `RouterStateSnapshot`. The `RouterStateSnapshot` is a large complex structure, containing many pieces of information about the current state and what's rendered by the router. This can cause performance
Expand Down

This file was deleted.

4 changes: 0 additions & 4 deletions projects/ngrx.io/content/navigation.json
Expand Up @@ -199,10 +199,6 @@
{
"title": "Configuration",
"url": "guide/router-store/configuration"
},
{
"title": "Default Router State Serializer",
"url": "guide/router-store/default-router-state-serializer"
}
]
},
Expand Down

0 comments on commit a1c1ee6

Please sign in to comment.