r/angularjs • u/cj5 • Aug 28 '15
Why, AngularJS?
http://victorblog.com/2012/12/20/make-angularjs-http-service-behave-like-jquery-ajax/
This is a huge deal breaker for me. Are the devs addressing this or is it something they don't plan on supporting?
2
Aug 28 '15
You do realize that article is 3 years old right?
AngularJS 1.4.x allows urlencoding objects without dependencies or transformRequest
http://stackoverflow.com/a/30970229/2577889
We have a problem in this subreddit of people not even caring to look for a solution before posting a thread about it.
1
u/cj5 Aug 28 '15
Yes, but I am using version 1.4.4, and this fix is relevant. If there is a newer fix, please, let me know.
2
u/ergo14 Aug 29 '15
IF you wanted jquery i think you should just stick to jquery, it seems unreasonable to assume that frameworks are supposed to behave same way. Whats the point of creating them in first place.
0
u/cj5 Aug 29 '15
First of all, jQuery's approach to what AngularJS does is convoluted and basically sucks. AngularJS I assumed did it better, up until I hit this wall.
2
u/ergo14 Aug 29 '15
I have no idea what you are talking about but it kind of sounds like you are hitting this:
http://www.bennadel.com/resources/uploads/2013/feelings_about_angularjs_over_time.png
1
0
Aug 28 '15
[deleted]
1
u/cj5 Aug 28 '15
I have to do this for each module?
0
Aug 28 '15
[deleted]
1
u/cj5 Aug 28 '15
Okay. I have multiple apps per page (I am compartmentalizing function). Is there a place globally I can set this?
0
2
u/schizoduckie Aug 28 '15 edited Aug 28 '15
This article is severely outdated and the wrong way to post forms like this. You want to use angular.identity (which is basically a 'passthrough' transformer) for this and a FormData object:
You can even upload files like this with zero effort, example here