Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

$http get broken on first use with latest unstable (works in stable) #3732

Closed
hunterloftis opened this issue Aug 24, 2013 · 3 comments
Closed

Comments

@hunterloftis
Copy link

Discovered this trying to recreate an issue I'm having with a custom directive that uses the $http service. Check the console in each... the code is identical, but with v1.0.7 the ajax request is made and with v1.2.0rc1 the ajax request is never sent. If you copy -> paste the ajax request lines in 1.2.0 then both of the requests are fired:

http://jsfiddle.net/mQpNh/

http://jsfiddle.net/xW4YY/1/

@hunterloftis
Copy link
Author

Tested different versions. Up to 1.1.3 works, then something breaks $http between 1.1.3 and 1.1.4:

http://jsfiddle.net/gfTZK/5/

@hunterloftis
Copy link
Author

With the absolute latest 1.2.0rc1 if you use $timeout instead, the ajax does fire. However, whether or not $http makes an ajax request shouldn't depend on whether or not it was called inside of a setTimeout or a $timeout - both should work. $timeout should only be necessary for $apply'ing the results.

@IgorMinar
Copy link
Contributor

dupe of #2438

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants