Hi András,
Ah, I see. I think that in this situation an decorator for $scope would do
the trick. You need to be aware that this only works for scopes created by
an ngController.
Scopes created by directives won't get touched this way.
However, you might want to consider a different approach. Let your
websocket service forward the events to $rootScope.$broadcast. To make this
easier to spot, and use you should use an prefix.
This enables you to do something like this:
$scope.$on('mySocket:someEvent',....)
$scope.$on('mySocket:someOtherEvent',....)
Those will get cleaned up automatically!
Regards
Sander
--
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.