Created
September 12, 2018 05:46
-
-
Save nathan-lapinski/2acf124d6361790f0653fa873f4789d6 to your computer and use it in GitHub Desktop.
Apply a redirect, and create a new url tree
This file contains 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
private applyRedirectCreatreUrlTree( | |
redirectTo: string, urlTree: UrlTree, segments: UrlSegment[], | |
posParams: {[k: string]: UrlSegment}): UrlTree { | |
const newRoot = this.createSegmentGroup(redirectTo, urlTree.root, segments, posParams); | |
return new UrlTree( | |
newRoot, this.createQueryParams(urlTree.queryParams, this.urlTree.queryParams), | |
urlTree.fragment); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment