title: httpconfig is not able to combine url params with the request url
body: <p>My code is as shown below:</p>
  
  <p>RestaurentInfoController.ts</p>
  
  <pre><code>module App.Controller {
      import Services = Core.Services;
      import Shared = Core.Shared;
  
      export class RestaurentInfoController extends BaseController {
  
          public userName: any;
          public password: any;
          public validUserName: boolean = false;
          public validPassword: boolean = false;
          public restaurentName: any = [];
          public checkBox: any;
          public restaurent: any;
          public foodTruckList: any = [];
          public foodCategories: any = [];
          public drinkCategories: any = [];
  
          static $inject: Array&lt;string&gt; = ['baseAppService', 'userAuthorizationService', 'storageService', 'eventService',];
  
          constructor(
              appService: Services.BaseAppService
              , public userAuthorizationService: Services.UserAuthorizationService,
              public storageService: Services.StorageService,
              public eventService: Services.AppEventBusService) {
              super(appService);
              this.getRestaurentList();
          }
          routeTo(view) {
              this.appService.routerService.routeToPage(view);
          }
  
          getRestaurentList = (): void =&gt; {
              this.appService.networkService.get&lt;any&gt;(this.appService.appConstant.appUrls.getFoodTruckName).then((response) =&gt; {
                  this.foodTruckList = response.data;
              },
                  (error) =&gt; { });
          }
  
          changeStatus = (): void =&gt; {
              if (this.checkBox === '1') {
                  this.getFoodCategories();
              }
              else if (this.checkBox === '2') {
                  this.getDrinkCategories();
              }
          }
  
          getFoodCategories = (): void =&gt; {
              console.log("rest " + this.restaurent);
              var data = {
                  _id: 'this.restaurent._id'
              }
              this.appService.networkService.get&lt;any&gt;(this.appService.appConstant.appUrls.getFoodCategories,data).then((response) =&gt; {
                  this.foodCategories = response.data;
                  console.log('popuar Items Loaded', this.foodCategories);
              },
                  (error) =&gt; { });
          }
  
          getDrinkCategories = (): void =&gt; {
              var data = {
                  _id: this.restaurent._id
              }
              this.appService.networkService.get&lt;any&gt;(this.appService.appConstant.appUrls.getFoodTruckName, data).then((response) =&gt; {
                  this.foodTruckList = response.data;
                  console.log('popuar Items Loaded', this.foodTruckList);
              },
                  (error) =&gt; { });
          }
      }
  
  }
  </code></pre>
  
  <p>NetworkService.ts</p>
  
  <pre><code>/// &lt;reference path="../../../typings/app.d.ts" /&gt;
  /// &lt;reference path="../../../typings/tsd.d.ts" /&gt;
  
  
  module Core.Services {
  
      export class NetworkService {
          static $inject: Array&lt;string&gt; = ['$http', '$log', '$q', 'appConstant', 'storageService'];
  
          constructor(public $http: ng.IHttpService, public $log: ng.ILogService, public $q: ng.IQService,
              public appConstant: Shared.AppConstants, public storageService: Services.StorageService) { }
  
          private onError(error: any): void {
              // generic handling for all error, including authorization realted stuff
              this.$log.error(error);
          }
  
          private getConfig(url: string, config?: ng.IRequestShortcutConfig): ng.IRequestConfig {
              var httpConfig = &lt;ng.IRequestConfig&gt;{};
              if (config != null) {
                  angular.extend(httpConfig, config);
              }
  
              var token = this.storageService.getItem(this.appConstant.keys.token, false);
              if (token != null) {
  
                  var tokenHeader = {
                      'Authorization': "Bearer " + token
                  };
  
                  var currentHeaders = httpConfig.headers;
                  if (currentHeaders) {
                      httpConfig.headers = angular.extend(currentHeaders, tokenHeader);
  
                  } else {
                      httpConfig.headers = tokenHeader;
                  }
              }
  
              httpConfig.url = url;
              return httpConfig;
          }
  
          private getOrDelete&lt;T&gt;(url: string, methodType: string, config?: ng.IRequestShortcutConfig): ng.IPromise&lt;T&gt; {
  
              var httpConfig = this.getConfig(url, config);
              httpConfig.method = methodType;
              return this.getResponse&lt;T&gt;(httpConfig);
          }
  
          private getResponse&lt;T&gt;(config: ng.IRequestConfig): ng.IPromise&lt;T&gt; {
              var deferred = this.$q.defer();
  
              config.headers
              this.$http(config).success(
                  (result: any) =&gt; {
                      deferred.resolve(result);
                  }).error((error, errorCode) =&gt; {
                      this.onError(error);
                      deferred.reject(new Core.Models.HttpError(error, errorCode));
                  });
  
  
              return deferred.promise;
          }
  
  
          get&lt;T&gt;(url: string, data?: any, config?: ng.IRequestShortcutConfig): ng.IPromise&lt;T&gt; {
  
              var httpConfig = this.getConfig(url, config);
              httpConfig.method = "GET";
              if (data) {
                  httpConfig.params = data;
              }
              return this.getResponse(httpConfig);
          }
  
  
          delete&lt;T&gt;(url: string, data?: any, config?: ng.IRequestShortcutConfig): ng.IPromise&lt;T&gt; {
  
              var httpConfig = this.getConfig(url, config);
              httpConfig.method = "DELETE";
              if (data) {
                  httpConfig.params = data;
              }
              return this.getResponse(httpConfig);
          }
  
  
          post&lt;T&gt;(url: string, data: any, config?: ng.IRequestShortcutConfig): ng.IPromise&lt;T&gt; {
  
              var httpConfig = this.getConfig(url, config);
              httpConfig.method = "POST";
              httpConfig.data = jQuery.param(data);
              httpConfig.headers = {
                  'Content-Type': 'application/x-www-form-urlencoded'
              };
              return this.getResponse&lt;T&gt;(httpConfig);
          }
  
          put&lt;T&gt;(url: string, data: any, config?: ng.IRequestShortcutConfig): ng.IPromise&lt;T&gt; {
  
              var httpConfig = this.getConfig(url, config);
              httpConfig.method = "PUT";
              httpConfig.data = data;
              return this.getResponse&lt;T&gt;(httpConfig);
          }
  
          patch&lt;T&gt;(url: string, data: any, config?: ng.IRequestShortcutConfig): ng.IPromise&lt;T&gt; {
  
              var httpConfig = this.getConfig(url, config);
              httpConfig.method = "PATCH";
              httpConfig.data = data;
              return this.getResponse&lt;T&gt;(httpConfig);
          }
      }
  }
  </code></pre>
  
  <p>Now what happens here is for <code>getFoodCategories()</code>, I am getting the end urls as 
  <code>http://myAPi.com/items/categories?_id=this.restaurent._id</code>. But i want url like this <code>http://myAPi.com/items/categories/this.restaurent._id</code>.Is there anything missing in my <code>NetworkService.ts</code> file?</p>