Reputation: 85
getItems(){
return.this._http.get('http://localhost/api/items').map(res=>res.json());
};
This error is coming in this simple code. Kindly tell me any fix of it. Thanks!
Upvotes: 1
Views: 11593
Reputation: 35202
Remove the "." after return
getItems() { return this._http.get('http://localhost/api/items').map(res => res.json()) };
Upvotes: 4