Click here to Skip to main content
15,883,705 members

Comments by Giridhari Mishra (Top 6 by date)

Giridhari Mishra 28-Aug-18 11:28am View    
Sure. Thanks.
Giridhari Mishra 16-Apr-18 9:03am View    
Hello, it is not impossible. We can achieve this by using json server. Thanks.
Giridhari Mishra 11-Apr-18 13:10pm View    
HTTP PUT will update the existing item. But I want to insert a new item.
Giridhari Mishra 11-Apr-18 11:19am View    
Okay. I agree. I am not doing it as a live application or going to implement this in real project. I am just practicing this. I do not want to use a database and create service. Can you tell me how I can insert items into the Json file in angular using typescript? If you know and give me the details that will help else we can stop here and assume that is not possible.
Giridhari Mishra 10-Apr-18 17:35pm View    
I am using the HTTP GET to get the items from the json and display in the page. That is working fine.
return this.http.get(this.dataUrl)
      .map(response => response.json())
      .catch(error => Observable.throw(error.json()));


I was trying to insert item into the same json file. If that is possible pls let me know. This is not the first attempt on web development but first attempt to insert item to Json file using a service.