How can a parameter from an URL be read within an AngularJS controller?
Let's say I have an URL like http://localhost/var/:value
and I want the value to be stored in a variable within the controller for the /var/:value
URL.
I have tried using $routeParams.value
and $route.current.params.value
but $routeParams
is undefined at the beginning and $route
doesn't work.