Thanks Sander. Here is a JsFiddle that demonstrates the issue (with my understanding, I'm sure;) : http://jsfiddle.net/fschwiet/wQA37/
There are two buttons that call event updateFoo. The second is using setTimeout, and in that case the $on call does not update the view when $scope is modified. Note that if you click the second one again it does update the view, but that is the digest change detected by the click handler and not the setTimeout completion/ $broadcast. On Sat, Mar 15, 2014 at 12:47 AM, Sander Elias <[email protected]>wrote: > Hi Frank, > > You should not need an $apply at all in the scenario you are describing. > If something does not update after an broadcast, there is something off in > the way you handle it. > You need an apply only if you are handling DOM generated events on your > own. (should be in a directive!). > Or if you need to handle async stuff that does not come from within > Angular. (this include using setTimeout!) > Can you build a plunk in that simulates the problem you are having? If so, > I will take a look, and will offer some guidance. > > Regards > Sander > > -- > You received this message because you are subscribed to a topic in the > Google Groups "AngularJS" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/angular/xaZcuKB7IlA/unsubscribe. > To unsubscribe from this group and all its topics, 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/d/optout. > -- 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/d/optout.
