You have nsted your structure too deep, and are not returning the data you 
need in the next promise.
remove the nested promises, and replace them with a 'flat' variant.

look at this:
// tslint:disable: no-console
const somePromise = Promise.resolve();
const someOtherPromise = x => Promise.resolve('nested');

const badSample = somePromise
.then(result => {
someOtherPromise(result).then(endresult => {
console.log(endresult);
});
})
.then(x => console.log('result', x));

const goodSample = somePromise
.then(result => someOtherPromise(result))
.then(x => console.log('result', x));


if you unnest your promises and return them, it will work a lot easier.

Regards
Sander

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/angular/6eafa3c4-f6b7-417b-8e6d-c72bc10e6d32%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to