Should I use angularjs $http service for requests or jquery ajax if possible?

后端 未结 4 1991
渐次进展
渐次进展 2021-01-06 07:28

In my project, I use angularjs framework and love using the $http service whenever I make an ajax call. But in parts of the project, where an UI is not directly

4条回答
  •  生来不讨喜
    2021-01-06 07:32

    If Ajax request does not interact with the UI, it doesn't really matters. $http is like Ajax request, the big difference is $http register to the digest cycle which update the UI with the new data. If there is no need in UI update, you can use whatever makes you happy.

提交回复
热议问题