1
  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!

1
  • 2
    return.this. see anything wrong there? :) Commented Jun 6, 2017 at 7:48

1 Answer 1

4

Remove the "." after return

getItems() {  return this._http.get('http://localhost/api/items').map(res => res.json()) };
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.