What is ActivatedRoute?
As one navigates through URLs, the router builds a tree of objects called ActivatedRoute. This tree of objects represents the current state of the router, the details of which can be retrieved from the RouterState object. In other words, the RouterState object representing the current state of navigation consists of a tree of ActivatedRoute objects. One could navigate to the parent, child, or sibling routes by invoking methods on this ActivatedRoute object. The RouterState object can be retrieved using routerState property of the router service. Note that the router service is the singleton service that every Angular application has.
ActivatedRoute is a router service which, once injected into the component, can be ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access