title: How to use $scope in $http url
body: <p>When I log the id it shows me the correct id. I want to pass this id in the second url and fetch data accordingly. </p>
  
  <p>Like when the id is 9 and when i put it like this <code>url: &amp;room_type=9&amp;day=1</code> it works but not when I use it this way <code>url: '&amp;room_type=' +$scope.id + '&amp;day=1'</code></p>
  
  <pre><code>        $http({
              method:'GET',
              url: '&amp;hotel_id=' +$scope.current_Hotel.hotel_id
          }).then(function(response){
              var roomdata = response.data;
              $scope.roomdata = roomdata;
              var roomtype = roomdata.data;
              angular.forEach(roomtype, function(value, key){
                  var id = value.room_type_id;
                  $scope.id = id;
                  console.info(id);
              });
          });
  
          $http({
              method:'GET',
              url: '&amp;room_type=' +$scope.id + '&amp;day=1'
          }).then(function(response){
              var plan = response.data;
              $scope.plan = plan;
          });
  </code></pre>