refactor(router): cleanup to navigation stream for readability and documentation (#25740)
* Pull out `activateRoutes` into new operator * Add `asyncTap` operator * Use `asyncTap` operator for router hooks and remove corresponding abstracted operators * Clean up formatting * Minor performance improvements PR Close #25740
This commit is contained in:

committed by
Kara Erickson

parent
12ccf57340
commit
64aa6701f6
@ -16,7 +16,7 @@ export function checkGuards(): MonoTypeOperatorFunction<NavigationTransition> {
|
||||
|
||||
return source.pipe(mergeMap(t => {
|
||||
if (!t.preActivation) {
|
||||
throw 'Initialized PreActivation required to check guards';
|
||||
throw new Error('PreActivation required to check guards');
|
||||
}
|
||||
return t.preActivation.checkGuards().pipe(map(guardsResult => ({...t, guardsResult})));
|
||||
}));
|
||||
|
Reference in New Issue
Block a user