I followed this answer: How to get query params from url in Angular 2?, and am not sure how they were able to test by entering http://localhost:4200?test=hi
. Please give advice - this does not work for me.
I have an AppComponent
and a router which routes to OrderComponent
. I need to get the query parameter from the URL in the AppComponent
and pass the same to the OrderComponent
.