March 2017
Intermediate to advanced
118 pages
2h 1m
English

During a navigation, after redirects have been applied, the router creates a
RouterStateSnapshot
.
interface RouterStateSnapshot {
root: ActivatedRouteSnapshot;
}
interface ActivatedRouteSnapshot {
url: UrlSegment[];
params: {[name:string]:string};
data: {[name:string]:any};
queryParams: {[name:string]:string};
fragment: string;
root: ActivatedRouteSnapshot;
parent: ActivatedRouteSnapshot;
firstchild: ActivatedRouteSnapshot;
children: ActivatedRouteSnapshot[];
}
As you can see
RouterStateSnapshot
is a tree of activated route snapshots. Every node in this tree knows about the "consumed" URL segments, ...
Read now
Unlock full access