I am using angular4 , I want add the smart table content to a new json file
when I click on the save button. Is it possible ?
In component.ts I used ,
source: LocalDataSource = new LocalDataSource();
constructor(private http : Http){
this.http.get('http://192.168.0.100:8000/json1')
.map(response => response.json())
.subscribe(data =>{ this.obj = data
this.source.load(this.obj);});
}
SaveData()
{
alert(JSON.stringify(this.Cost));
// this is function which will active when the save button is pressed.
}
[image: enter image description here]
when click on the save button I want to overwrite the existing json1 file from
the server. I there any solution for this ??
Thanks in advance..
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.