Commit c6096aa2 authored by prumde's avatar prumde

Updated ecm-product.service.ts


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@174521 ce508802-f39f-4f6c-b175-0d175dae99d5
parent df2e1343
...@@ -6,17 +6,18 @@ import 'rxjs/add/operator/map'; ...@@ -6,17 +6,18 @@ import 'rxjs/add/operator/map';
import { Store } from '@ngrx/store'; import { Store } from '@ngrx/store';
import { ItemDetail } from '../../ecm-model/product-detail-model'; import { ItemDetail } from '../../ecm-model/product-detail-model';
import { HostUrlService } from '../../host-url.service';
@Injectable() @Injectable()
export class EcmProductService { export class EcmProductService {
private SERVICE_URL = '/ecm/service/category/itemlist/'; // URL to web service private SERVICE_URL = '/ecm/service/category/itemlist/'; // URL to web service
constructor (private http: Http,) {} constructor (private http: Http,public hostUrlService : HostUrlService) {}
getItems (scatCode : string): Observable<ItemDetail[]> { getItems (scatCode : string): Observable<ItemDetail[]> {
let itemsUrl = this.SERVICE_URL + scatCode ; let itemsUrl = this.hostUrlService.hostUrl+this.SERVICE_URL + 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