title: Passing URL parameter to Rest Method through Angular $HTTP
body: <p>I am having trouble sending URL parameters to a rest method through a angular optimized html page.  </p>
  
  <p>My rest method: </p>
  
  <pre><code>    router.get("/url/id/:urlid",function(req,res){
      var query = "SELECT urlID AS libraryid, "
                  + "URL AS libraryitem "
                  + "FROM ?? "
                  + "WHERE active = 1 "
                  + "AND ?? = ? "
      whereClause = ['urls', 'urlid', req.params.urlid];
      query = mysql.format(query,whereClause);
      connection.query(query,function(err,rows){
          if(err) {
              console.log("Rest Call Error");
              res.json({"Error" : true, "Message" : "Error executing MySQL query", "Query" : query});
          } else {
              console.log("Rest Call Success", rows);
              res.json({"Error" : false, "Message" : "Displayed the url  "+req.params.urlid, "Query" : query, "URLs" : rows});
          }
      });
  </code></pre>
  
  <p>I can call the rest method directly and receive the following results</p>
  
  <pre><code>{
    "Error": false,
    "Message": "Displayed the url  5",
    "Query": "SELECT urlID AS libraryid, URL AS libraryitem FROM `urls` WHERE active = 1 AND `urlid` = '5' ",
    "URLs": [
      {
        "libraryid": 5,
        "libraryitem": "url"
      }
    ]
  }
  </code></pre>
  
  <p>The Controller</p>
  
  <pre><code>app.controller("UrlByIDController", function ($scope, $http) {
  $http.get('/api/url/id/{{urlid}}')
  .then(function(data) {
    console.log("URl loading", data)
    $scope.links = data['URLs'];
  })
  .catch(function(response) {
    console.error('Loading URL error', response.status, response.data);
  })
  .finally(function() {
    console.log("finally finished loading urls");
  });
  });
  </code></pre>
  
  <p>The html template </p>
  
  <pre><code>&lt;div class="form-group"&gt;
      &lt;label for="txtURL" class="control-label col-xs-3"&gt;URL&lt;/label&gt;
      &lt;div class="col-xs-3" ng-controller="UrlByIDController" &gt;
        &lt;input  type="text" 
                id="txtURL" 
                class="ng-valid ng-dirty" 
                ng-model="formData.txtURL" 
                value="{{links.libraryitem}}" 
                placeholder="URL of Ad" /&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>When I debug the page I don't get an error but the id value that is passed to the rest method is the phrase 'urlid'.  I am sure it is something pretty basic I am missing.  </p>