0

I am working on one web application which is Single Page Application.

In that my front end will be on server and back end will be on other server.

So for each add/edit/delete/fetch operation , i need to call an Ajax request to the Back End.

There are plenty of ajax requests till now.So is there any way to handle them. I mean in angular js is there any way to do so?

FYI. I am bit new in the Angular Js.

Thanks.

2
  • Are you asking how to best structure your code, so you could easily add new HTTP requests to your client, or how to handle numerous HTTP requests in AngularJS, using batches? Commented Aug 20, 2016 at 10:41
  • 1
    $http, $resource services. Commented Aug 20, 2016 at 10:43

1 Answer 1

2

You can create factories using ngResource https://docs.angularjs.org/api/ngResource or individually using make individual requests using $http service provider https://docs.angularjs.org/api/ng/service/$http. I would recommend to go for factories method. You will find this link useful if you are looking for ward to experiment it https://www.sitepoint.com/creating-crud-app-minutes-angulars-resource/

Sign up to request clarification or add additional context in comments.

1 Comment

I tried sitepoint.com/creating-crud-app-minutes-angulars-resource link. I have created factories using ngResource for two end points initially. I will use more as application progresses. Thanks :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.