Commit db02c847 authored by prumde's avatar prumde

Updated ecm-related-item.service.ts .


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@174523 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 5a449e49
......@@ -5,18 +5,20 @@ import 'rxjs/add/operator/catch';
import 'rxjs/add/operator/map';
import { ItemDetail } from '../../ecm-model/product-detail-model';
import { HostUrlService } from '../../host-url.service';
@Injectable()
export class EcmRelatedItemService {
private trendsUrl = '/ecm/service/category/related'; // URL to web service
constructor (private http: Http) {}
constructor (private http: Http,public hostUrlService : HostUrlService) {}
getRelatedItems(scatCode): Observable<ItemDetail[]> {
let headers = new Headers( { 'Content-Type': 'application/json' });
let options = new RequestOptions( { headers: headers });
let URL = this.trendsUrl + '/' +scatCode;
let URL = this.hostUrlService.hostUrl+this.trendsUrl + '/' +scatCode;
return this.http.get( URL, options )
.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