Hi Ka,
You need to unsubscribe on destroy. When you are no longer interested in an
subscription, you call it's unsubscribe function. How that is done is a bit
dependent on the RX version you are using.
In RX 4 it is done something like this:
var subscription = companySrchSubject.subscribe(subscription)
$scope.$on('$destoy`, () => subscription.dispose())
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 https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.