import { Injectable } from '@angular/core';
import {Http, Request, RequestMethod, Response,
RequestOptions, Headers } from '@angular/http';
import 'rxjs/add/operator/map';
import {Observable} from 'rxjs/Observable';
import {SaveDetails} from './SaveDetails';
@Injectable()
export class Uraxservice
{
private _url: string="app/MarketTwoDetails.json"
private url2: string="app/fetch.json"
constructor(private _httpurl:Http){
}
GetUraxDetails(){
return [
{"id": 1, "name": 'MarketIndia' },
{"id": 2, "name": 'MarketAustralia' },
{"id": 3, "name": 'MarketBrazil' },
{"id": 4, "name": 'MarketRussia' },
{"id": 5, "name": 'MarketUSA' }
]
}
GetDropdownTwo(){
return this._httpurl.get(this._url)
.map((response :Response) => response.json());
//.map((res:Response) => res.json());
}
//Get
getContacts(): Observable<SaveDetails[]> {
//debugger
return this._httpurl.get(this.url2)
.map(res => <SaveDetails[]>res.json())
}
//Get
//getContacts(): Observable<SaveDetails[]> {
//debugger
// return this._httpurl.get(this.url2)
// .map(res => <SaveDetails[]>res.json())
}