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
http://localhost/var/:value
Requirements: Ensure 'ngRoute' is in your app module
Route provider set up as: http://localhost/var/:valName
Function set up as:
function functionName($scope, $routeParams){$scope.value = $routeParams.valName;}
HTML view:
{{value['valName']}}