Commit 2edfd67f authored by prumde's avatar prumde

Updated ecm-trend-product.service.ts


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@174525 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 424d015f
...@@ -5,19 +5,20 @@ import 'rxjs/add/operator/catch'; ...@@ -5,19 +5,20 @@ import 'rxjs/add/operator/catch';
import 'rxjs/add/operator/map'; import 'rxjs/add/operator/map';
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 EcmTrendProductService { export class EcmTrendProductService {
private trendsUrl = '/ecm/service/category/current-trends'; // URL to web service private trendsUrl = '/ecm/service/category/current-trends'; // URL to web service
constructor (private http: Http) {} constructor (private http: Http,public hostUrlService : HostUrlService) {}
getTrending(): Observable<ItemDetail[]> { getTrending(): 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 });
return this.http.get( this.trendsUrl, options ) return this.http.get( this.hostUrlService.hostUrl+this.trendsUrl, options )
.map( (res) => this.extractData(res) ) .map( (res) => this.extractData(res) )
.catch( this.handleError ); .catch( this.handleError );
} }
......
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