angularjs - $http.post().then vs $q library? -


it understanding when $http.post(...).then(...) in angularjs, returns promise. confusing part me $q promise library , if $http.post(...).then(...) creates promise me, $q library necessary?

if dealing respose via $http.post(...).then(...) don't need use $q service directly.

but angular uses $q internaly when calling $http.

also note $q not separate library, module inside angular core.


Comments

Popular posts from this blog

javascript - How to process users in one specific order using map o each function? -

java - Two interface have same method name with different return type -

javascript - Linking from page A to a specific iframe on page B -