title: how to pass authtoken via header using angular js
body: <p>I am trying to pass my api authtoken via the header. I am new to angular js so i am not able to do that. My code:</p>
  
  <pre><code>$scope.init=function(authtoken,cityname){   
          $scope.authtoken=authtoken;                     
          $scope.cityname=cityname;               
          $http({method: 'GET', url: '/api/v1/asas?city='+$scope.cityname+'&amp;auth='+$scope.authtoken}).success(function(data) {                
  </code></pre>
  
  <p>Right now I am passing the authtoken in the api url. But I want to pass the token via the header.</p>