We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
readRouteData
1 parent f4ac42a commit dd612fcCopy full SHA for dd612fc
1 file changed
packages/router/src/route-data/use.ts
@@ -32,6 +32,13 @@ export function useRouteData<T>(
32
);
33
}
34
35
+export function readRouteData<T>(
36
+ data: Data,
37
+ token: RouteDataToken<T>,
38
+): T | undefined {
39
+ return data[token.key];
40
+}
41
+
42
function aggregateRouteTreeData(root: ActivatedRoute): Observable<Data> {
43
const observables: Observable<Data>[] = [root.data];
44
for (const child of root.children)
0 commit comments