Search code examples
angularangular-routingangular-router

activatedroute paramMap observable subscription ordering


Say there is a component where the paramMap is subscribed in the component template using the async pipe. Is it guaranteed that the subscription will work and that the paramMap will not have already emitted the route change when the component and the associated template is instantiated.


Solution

  • For anyone who has the same question, the observable in this case appears to be cold and hence everytime there is a subscription, the observer will get the param values.