So the Fiddle is forked from an old example that had the $http mocking. I did not realize that $resource did not always expose the query promises. It's actually lucky because although I am using a later ngResource version which does have $resource in the codebase, you did happen upon the problem more or less: It turns out some bad bower config has this proj on angular v1.2.6 but ngResource v1.2.3 . Should have noticed. After fixing that, it works :)
Thanks Lucas! On Wednesday, January 15, 2014 2:26:28 PM UTC-8, Lucas Galfaso wrote: > > Hi, > Update to a newer version of ngResource (one that does provide $promise) > as if you use the old version that you have $rootScope.foos.$promise is > undefined > > Regards, lg > > On Wednesday, January 15, 2014 6:52:51 PM UTC-3, Lennon Pulda-Grealy wrote: >> >> I should note that since the JSFiddle directs you to the console, when >> you open it you will find logging entries from the initial run upon page >> load, which appear as if $q.all() worked as expected (although the result >> pane tells a different story). Run it with the console open and hit Run >> again though and the output should be interesting. In other words, after >> clicking link: >> >> 1) open browser JS console, >> 2) JSFiddle Run / ctrl-return >> >> On Wednesday, January 15, 2014 1:37:53 PM UTC-8, Lennon Pulda-Grealy >> wrote: >>> >>> As the title says, it would appear that if I give $q.all() an array of >>> $resource promises, the .then() execution seems to happen before those >>> promises are resolved. >>> >>> http://jsfiddle.net/mJ9xx/4/ >>> >>> Does anyone have any insight on it? >>> >>> -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/groups/opt_out.
