Skip to content
This repository has been archived by the owner on Jan 14, 2020. It is now read-only.

allow to unregister registered "on complete" callbacks #29

Open
patriciagarcia opened this issue Aug 9, 2016 · 0 comments
Open

allow to unregister registered "on complete" callbacks #29

patriciagarcia opened this issue Aug 9, 2016 · 0 comments

Comments

@patriciagarcia
Copy link
Contributor

patriciagarcia commented Aug 9, 2016

Both locationsService and productsService provide a callOnReplicationComplete function. While that function was created to be used by other angular-nav-data services (lgasService, statesService, zonesService and productsListService) and it works fine for those, since it's publicly available it could also be used by components within the app including angular-nav-data as a dependency. Since components are created and destroyed all the time, in order to have the right component registered to an event without going over the limit of the EventEmitter is to register to the event $onInit and unregister $onDestroy, for that a function for unregistering callbacks is required.

@patriciagarcia patriciagarcia changed the title allow to unregistered registered "on complete" callbacks allow to unregister registered "on complete" callbacks Aug 9, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant