What is the difference between $http and $resource?
Answer Posted / 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 View All Answers
What is the spa (single page application) in angularjs?
What is ng-app, ng-init, and ng-model?
What are differences between angular 4 and angular 2?
What does :host-context() pseudo-class selector target?
What is pipe in angular?
What is digest loop?
How do you identify a structural directive in html?
What is the aot?
What is httpclient in angular?
Explain different filters provided by angularjs?
When do you use template-driven vs model-driven forms? Why?
Why there are two “destroy” events associated with the termination of scope in angularjs?
explain ivy renderer in angular?
What is the difference between a unit and end-to-end (e2e) test in angularjs?
Which directive is used to hide elements from the html dom by removing them from that dom and not changing their styling?