The problem is that the method is returning me undefinded
the code is
getLugares() {
this._http.get(this.url + 'lugar') //usar la url que corresponda
.map(res => res)
.subscribe(
res => this.lugares=res,
err => console.error(err),
() => console.log('Funciona!')
);
}
It is not a problem of the web service or the URL because I already tried them. Also when changing line 5 so res => console.log(res),
in the log the array appears correctly