createUrlTreeFromSnapshot
function
Creates a UrlTree
relative to an ActivatedRouteSnapshot
.
API
Usage Notes
function createUrlTreeFromSnapshot( relativeTo: ActivatedRouteSnapshot, commands: any[], queryParams?: Params | null, fragment?: string | null): UrlTree;
createUrlTreeFromSnapshot
Creates a UrlTree
relative to an ActivatedRouteSnapshot
.
@paramcommands
any[]
An array of URL fragments with which to construct the new URL tree.
If the path is static, can be the literal URL string. For a dynamic path, pass an array of path
segments, followed by the parameters for each segment.
The fragments are applied to the one provided in the relativeTo
parameter.
@paramfragment
string | null
@returns
UrlTree
Jump to details