title: AngularJS | Set Path Parmeter while using $http.get method
body: <p>I have a GET endpoint with URI as /user/user-id . The 'user-id' is the path variable here.</p>
  
  <p>How can I set the path variable while making the GET request?</p>
  
  <p>This is what I tried:-</p>
  
  <pre><code>$http.get('/user/:id',{
                  params: {id:key}
              });
  </code></pre>
  
  <p>Instead of replacing the path variable, the id get appended as query param. 
  i.e my debugger show the request URL as <code>'http://localhost:8080/user/:id?id=test'</code></p>
  
  <p>My expected resolved URL should be like '<a href="http://localhost:8080/user/test">http://localhost:8080/user/test</a>'</p>