What is the difference between $http and $resource?



What is the difference between $http and $resource?..

Answer / chaitanya

$http is good for quick retrieval of server-side data that doesn’t really need any specific structure or complex behaviors. $http is good for retrieval of RESTful server-side data sources that might need any specific structure or complex behaviors.

$resource warps $http and allows you to interact with RESTful server-side data sources. It requires the ngResource module to be installed which exist in angular-resource.js

Is This Answer Correct ?    4 Yes 1 No

Post New Answer

More AngularJS Interview Questions

Mention what are the styling form that model adds to css classes?

0 Answers  


Differentiate between one-way binding and two-way data binding.

0 Answers  


What is difference between structural and attribute directives?

0 Answers  


What is token based authentication in angular 4?

0 Answers  


Do you know scope in angular?

0 Answers  






How to perform animation in angular?

0 Answers  


What is the latest angular?

0 Answers  


Explain the architecture of angular 2?

0 Answers  


Explain the concept of hierarchy?

0 Answers  


What are different states of a form in AngularJS?

1 Answers  


Can you disable route guard?

0 Answers  


How can I be lazy?

0 Answers  


Categories