0

I'm refreshing a website that uses the cropit plugin.

The current version of the app uses jQuery to proceed to an ajax image upload.

Since I'm using angular.js to handle other forms submission I was wondering if I should change the way the image is uploaded too, or if it is disadvised to mix jquery ajax requests along with angular.

What should I do ?

1
  • It is all javascript, and can be made to work together. However, doing things the 'Angular way' does not usually include using jQuery (Although angularjs does include jqlite). Commented Nov 3, 2015 at 22:08

1 Answer 1

0

Angular has its own method to make ajax requests. Is the image upload adding the image to the angular form submission? If so then use $scope.$apply() in the jQuery ajax response callback so Angular will digest cycle the form change of the uploaded image.

1
  • No it doesn't. Do you mean I should add the image to the scope and let angular doing everything ? Commented Nov 4, 2015 at 9:37

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.