title: Multiple query string parameters in angularjs
body: <p>I'm struggling with passing and reading multiple query string parameters in a route.</p>
  
  <pre><code>$routeProvider.when("/joboffers:keywords:location", {
      controller: "jobOffersController",
      templateUrl: "/App/Views/JobOffer/All.html"
  });
  </code></pre>
  
  <p>This is the search page:</p>
  
  <pre><code>$scope.searchJobOffer = function () {
      var vm = $scope.jobOfferSearchViewModel;
      var path = "/joboffers?keywords=" +( vm.keywords || "") + "&amp;location=" + (vm.location || "");
      $location.path(path);
  }
  </code></pre>
  
  <p>And this is the JobOffersController:</p>
  
  <pre><code>'use strict';
  app.controller('jobOffersController', ['$scope', '$routeParams', 'jobOfferService', function ($scope, $routeParams, jobOfferService) {
      $scope.jobOffers = [];
  
      function init() {
          var keywords = $routeParams.keywords;
          var location = $routeParams.location;
      }
  
      init();
  }]);
  </code></pre>
  
  <p>Reading the $routeParams is not working at all. If I pass "developer" as a keyword and "New York" as location, the $routeParam object looks like this:</p>
  
  <pre><code>{keywords: "?keywords=developer&amp;location=New Yor", location: "k"}
  </code></pre>
  
  <p>Can somebody tell me what I'm doing wrong? Thanks in advance.</p>
  
  <p>P.S.
  Is it possible that this is because of a wrongly configured route?
  When I navigate via the <code>searchJobOffer</code> function, it encodes the URL to this: <code>http://localhost:49380/#/joboffers%3Fkeywords=developer&amp;location=london</code> and if I try to use this url <code>http://localhost:49380/#/joboffers?keywords=developer&amp;location=london</code>, the routing system drops me to the default route (#/home)</p>