Hi,
you should never do thing like this:
function someOutOfAngularCallback() {
//tell something to angular
//invoke some controller's or service's methods
//and at the end:
$rootScope.$apply();
}
The above should look like this to confirm with AngularJS specification:
function someOutOfAngularCallback() {
//here you can do stuff not related to angular
//and now:
$rootScope.$apply(function() {
//we are now withing Angular call stack,
//do here whatever you want with
//angular controllers, services or whatever
}
}
Regards,
Witold Szczerba
On 8 August 2012 20:08, Andy Joslin <
andyt...@gmail.com> wrote:
> Here's my socketIo service. It just has an $on method that does $apply,
> some logging helpers, and everything else is normal.
http://d.pr/n/ies4
>
> --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To post to this group, send email to
ang...@googlegroups.com.
> To unsubscribe from this group, send email to
>
angular+u...@googlegroups.com.
> Visit this group at
http://groups.google.com/group/angular?hl=en.
>
>