Read JSON object from Url in AngularJS 2

Last Reply 8 months ago By dharmendr

Posted 8 months ago

Hi sir,

i am refering  this link 

https://www.youtube.com/watch?v=oLtwPzr_8uA

to read the array of json object,

like  that i  created  method ..

export class EmployeeService {
private _url: string = 'http://localhost:8080/Employee/getEmployeeList';

constructor(private _http: Http) {
}

public getallemployee() {
return this._http.get(this._url)
.map((response: Response ) => response.json());
}
}

but i am not able to read the json data, so what can i place in the _url,

my method getEmployeeList return array of json object,

thanks and regards

siddu