Reputation: 1
I have two web api to sync data from local to server. my Data is in master / child form. My need is to once master data is synced then child data to be sent for syncing. I am very new in angular js. Kindly help me.
Upvotes: 0
Views: 216
Reputation: 13997
First do the first request, and on the callback do the second:
$http.get("firstRequestUrl").then(function(data) {
// success
$http.get("secondRequestUrl?myVar=" + data.myVar).then(function(secondData) {
// second request success
}
}
Upvotes: 3