title: How to get parameters value using $routeParams from URL in angular js?
body: <p>I am working on Angularjs, I am stuck in weired problem, I am not able to get parameters value from URL using $routeParams..</p>
  
  <pre><code>var MyApp = angular.module('testAngularApp', ['ngRoute','ngResource'])
      .config(['$routeProvider',
          function ($routeProvider) {
              $routeProvider.
                  when('/', {
                  when('/updateUser/:id', {
                      templateUrl: 'Pages/User/Edit.html',
                      controller: 'UpdateUserCtrl'
                  })
          }]);
  </code></pre>
  
  <p>controller</p>
  
  <pre><code>angular.module('testAngularApp').
      controller('UpdateUserCtrl', ['$scope', 'updateUserService', '$http','$route', '$routeParams', function ($scope, updateUserService, $routeParams,$route, $http) {
          $scope.testV = "Update User Ctrl";
          console.log("hello");
          $scope.params1 = $routeParams.id; 
          console.log($routeParams.id ); //i am getting undefined
          console.log($scope.params1); //i am getting undefined
          var check = $routeParams['id'];
          console.log(check); //i am getting undefined
      }]);
  </code></pre>
  
  <p>please tell me how to get values from URL, I have went through these solutions but it didn't work for me..
  <a href="https://stackoverflow.com/questions/11758079/how-to-get-the-url-parameters-using-angular-js">link1</a>
  <a href="https://stackoverflow.com/questions/20655877/angularjs-get-current-url-parameters">link2</a></p>