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

What do you mean by data binding?

0 Answers  


What is difference between service and factory?

0 Answers  


Differentiate between Observables and Promises?

0 Answers  


Why Typescript with Angular?

0 Answers  


What are directives? How to create and use custom directive in angularjs.

0 Answers  


What is the purpose of using package.json in the angular project?

0 Answers  


Explain what is Angular Expression?

0 Answers  


How angularjs is used to handle the security hurdles?

0 Answers  


When using ngif if the condition is true. How to display the message and if the condition is false then how to display the message?

0 Answers  


What is node js good for?

0 Answers  


How angular 4 is different from angular 2?

0 Answers  


Explain directives ng-if, ng-switch and ng-repeat?

1 Answers  


Categories