I am redirecting to my Angular2 site with some (optional) appended parameters like so:
https://my-site.com/?param1=some-value1¶m2=some-value2
So i want to extract the values into variables if they exist:
let value1 = extractValueByParam(url, param1Str);
Can it be done with router variables? Or what is the "correct" way of doing this?
So far the best method I have found is to use window.location.href value and parse it myself, but it does not seem like the right thing to do.
Thanks!