Routing



How do I access the query param ?
If the component loads for the first time, we can access via snapshotà code inside the red rectangle.
If there is another route within the component then fetching of query params would fail.
Hence use the params approach and subscribe to any new routing triggerà code inside yellow rectangle.


How do i inform angular that the query param for eg:- id is not a atsring rathere it is a number???

Comments