I am using states to go from page to page. From one of URLs I am reading parameter from URL (id) and I can easily do this when defining state.
.config(function($stateProvider) {
$stateProvider
.state("testing", {
url: "/testSession/:id",
controller: "UserTestSessionController",
templateUrl: "./app/components/userTestSession/user-test-session.html",
controllerAs: "vm"
})
})
My URL looked like this: localhost:8000\testSession\id
If I change URL to look like this: localhost:8000\testSession\id?otp="someStringValue" can I somehow define otp in url param of state? Or do I need to change it totally?
$locationto get the query string ?