Commit 424d015f authored by prumde's avatar prumde

Updated ecm-sub-category.service.ts .


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@174524 ce508802-f39f-4f6c-b175-0d175dae99d5
parent db02c847
...@@ -4,6 +4,7 @@ import { Observable } from 'rxjs/Observable'; ...@@ -4,6 +4,7 @@ import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/catch'; import 'rxjs/add/operator/catch';
import 'rxjs/add/operator/map'; import 'rxjs/add/operator/map';
import {Store} from '@ngrx/store'; import {Store} from '@ngrx/store';
import { HostUrlService } from '../../host-url.service';
import { SubCategory } from '../../ecm-model/subcategory-model'; import { SubCategory } from '../../ecm-model/subcategory-model';
...@@ -12,12 +13,12 @@ export class EcmSubCategoryService { ...@@ -12,12 +13,12 @@ export class EcmSubCategoryService {
private SERVICE_URL = '/ecm/service/category'; // URL to web service private SERVICE_URL = '/ecm/service/category'; // URL to web service
constructor (private http: Http) {} constructor (private http: Http,public hostUrlService : HostUrlService) {}
getSubCategories( catCode: string ): Observable<SubCategory[]> { getSubCategories( catCode: string ): Observable<SubCategory[]> {
let subCategoriesUrl = this.SERVICE_URL + '/' + catCode + '/list'; let subCategoriesUrl = this.hostUrlService.hostUrl+this.SERVICE_URL + '/' + catCode + '/list';
let headers = new Headers( { 'Content-Type': 'application/json' }); let headers = new Headers( { 'Content-Type': 'application/json' });
let options = new RequestOptions( { headers: headers }); let options = new RequestOptions( { headers: headers });
...@@ -28,7 +29,7 @@ export class EcmSubCategoryService { ...@@ -28,7 +29,7 @@ export class EcmSubCategoryService {
getSubCategory (scatCode : string): Observable<SubCategory> { getSubCategory (scatCode : string): Observable<SubCategory> {
let subCategoryUrl = this.SERVICE_URL + '/list/' + scatCode; let subCategoryUrl = this.hostUrlService.hostUrl+this.SERVICE_URL + '/list/' + scatCode;
let headers = new Headers({ 'Content-Type': 'application/json' }); let headers = new Headers({ 'Content-Type': 'application/json' });
let options = new RequestOptions({ headers: headers }); let options = new RequestOptions({ headers: headers });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment