I'm trying to demonstrate something using url-query parameters using plunker, but I can't even get the parameters to show up (and then consequently not demonstrate my original issue).
I have created a simple plunker where the states url property looks like this: url: '/root?firstParam'
What I want then is to populate $stateParams.firstParam
with whatever I write in the url of the browser for that queryParameter.
Plunker, plunkerWithParameter?firstParam=foo
I would imagine that $stateParams.firstParam
would be undefined for the first url, but set to "foo" for the second. But it's undefined in both cases.
How can I get the $stateParams.firstParam
to be set?