Commit 2d213a74 authored by kpandey's avatar kpandey

updated

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@174986 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 605ed6d7
...@@ -11,14 +11,15 @@ import { HostUrlService } from '../../host-url.service'; ...@@ -11,14 +11,15 @@ import { HostUrlService } from '../../host-url.service';
@Injectable() @Injectable()
export class EcmRelatedItemService { export class EcmRelatedItemService {
private SERVICE_URL = '/ecm/service/category/related'; // URL to web service // private SERVICE_URL = '/ecm/service/L2D01/category/related'; // URL to web service
private SERVICE_URL = '/ecm/service';
constructor (private http: Http,public hostUrlService : HostUrlService) {} constructor (private http: Http,public hostUrlService : HostUrlService) {}
getRelatedItems(scatCode): Observable<ItemDetail[]> { getRelatedItems(scatCode): Observable<ItemDetail[]> {
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 });
let URL = this.hostUrlService.hostUrl+this.SERVICE_URL + '/' +scatCode; let siteCode = localStorage.getItem('SITE_CODE');
let URL = this.hostUrlService.hostUrl+this.SERVICE_URL + '/' + siteCode + '/category' + '/related' + '/' + scatCode;
return this.http.get( URL, options ) return this.http.get( URL, options )
.map( (res) => this.extractData(res) ) .map( (res) => this.extractData(res) )
......
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