Nishu Goel
1 min readNov 30, 2019

--

Hi Saroj,

  1. you simply want to refer to the database created in the createDb() method by the name ‘users’. So apiurl has to be equal to the data coming ‘users’. You can refer to it saying apiurl = ‘./users’ too. The idea is just to get the data from users. I used the word api for better understanding.
  2. The perfOp property should actually be httpOptions (thanks for pointing this out, let me correct this) with whatever header details that you have set. And we can pass it with the url while making the API call as you see here:

return this.http.post<User>(this.apiurl, user, this.httpOptions).pipe( tap(data => console.log(data)), catchError(this.handleError) );

--

--

Nishu Goel
Nishu Goel

Written by Nishu Goel

Engineering stuff @epilotGmbH; Web Google Developer Expert; Microsoft MVP;

No responses yet