You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -40,7 +42,7 @@ A _local_ `RouterStore` requires a component-level provider, follows the
40
42
lifecycle of that component, and can be injected in declarables as well as
41
43
other component-level services.
42
44
43
-
### Global router store
45
+
####Global router store
44
46
45
47
An application-wide router store that can be injected in any class. Use
46
48
`provideGlobalRouterStore` to provide it in a root environment injector.
@@ -107,7 +109,7 @@ export class HeroDetailComponent {
107
109
}
108
110
```
109
111
110
-
### Local router store
112
+
####Local router store
111
113
112
114
A component-level router store. Can be injected in any directive, component,
113
115
pipe, or component-level service. Explicitly provided in a component sub-tree
@@ -134,3 +136,34 @@ export class HeroDetailComponent {
134
136
this.#routerStore.selectRouteParam('id');
135
137
}
136
138
```
139
+
140
+
### Serializable router state
141
+
142
+
Several of the Angular Router's types are recursive which means that they aren't serializable. The router stores exclusively use serializable types to support advanced state synchronization strategies.
143
+
144
+
#### MinimalActivatedRouteSnapshot
145
+
146
+
The `MinimalActivatedRouteSnapshot` interface is used for the observable `RouterStore#currentRoute$` property. This interface is a serializable subset of the Angular Router's `ActivatedRouteSnapshot` class and has the following public properties.
|`children: MinimalActivatedRouteSnapshot[]`| The children of this route in the route tree. |
151
+
|`data: MinimalRouteData`| The static and resolved data of this route. |
152
+
|`firstChild: MinimalActivatedRouteSnapshot \| null`| The first child of this route in the route tree. |
153
+
|`fragment: string \| null`| The URL fragment shared by all routes. |
154
+
|`outlet: string`| The outlet name of the route. |
155
+
|`params: Params`| The matrix parameters scoped to this route. |
156
+
|`queryParams: Params`| The query parameters shared by all routes. |
157
+
|`routeConfig: Route \| null`| The configuration used to match this route. |
158
+
|`title: string \| undefined`| The resolved route title. |
159
+
|`url: UrlSegment[]`| The URL segments matched by this route. |
160
+
161
+
#### MinimalRouteData
162
+
163
+
The `MinimalRouteData` interface is used for the `RouterStore#data$` property. This interface is a serializable subset of the Angular Router's `Data` type. In particular, the `symbol` index in the Angular Router's `Data` type is removed. `MinimalRouteData` has the following signature.
0 commit comments