Created
March 10, 2018 02:06
-
-
Save jschwarty/adc725c639fc871dd9d58e5528ea62c7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ActivatedRouteSnapshot } from '@angular/router'; | |
export function getFullTreeParams(route: ActivatedRouteSnapshot, params = {}) { | |
if (route) { | |
params = {...params, ...route.params}; | |
} | |
return route.firstChild | |
? this.getFullTreeParams(route.firstChild, params) | |
: params; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment