I am planning to use angularjs promises in my application. But I am not getting actual difference between .success function and .then function.
Asked
Active
Viewed 60 times
1
-
possibly duplicate of http://stackoverflow.com/questions/16385278/angular-httppromise-difference-between-success-error-methods-and-thens-a – Arun Redhu Mar 02 '17 at 05:22
-
2Possible duplicate of [Angular HttpPromise: difference between \`success\`/\`error\` methods and \`then\`'s arguments](http://stackoverflow.com/questions/16385278/angular-httppromise-difference-between-success-error-methods-and-thens-a) – shA.t Mar 02 '17 at 05:29
1 Answers
1
1.advantages of promises is the ability to flatten and chain potentially complex sequences of ajax calls. Not only does this help us simplify code, but more importantly, it helps us manage timing and dependencies through a sequence of calls.
2.The fundamental difference between 'success' and 'then' is that success will return the original promise instead of returning a new derived promise. Each then() invocation returns a fresh promise – which is key to chaining multiple promise calls.
for detailed difference check here

Jayanti Lal
- 1,175
- 6
- 18