{"action":"closed","issue":{"url":"https://api.github.com/repos/driftyco/ionic-platform-web-client/issues/12","labels_url":"https://api.github.com/repos/driftyco/ionic-platform-web-client/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/driftyco/ionic-platform-web-client/issues/12/comments","events_url":"https://api.github.com/repos/driftyco/ionic-platform-web-client/issues/12/events","html_url":"https://github.com/driftyco/ionic-platform-web-client/issues/12","id":111120388,"number":12,"title":"register() always adds a new listener (dev mode)","user":{"login":"ivanarrizabalaga","id":4146319,"avatar_url":"https://avatars.githubusercontent.com/u/4146319?v=3","gravatar_id":"","url":"https://api.github.com/users/ivanarrizabalaga","html_url":"https://github.com/ivanarrizabalaga","followers_url":"https://api.github.com/users/ivanarrizabalaga/followers","following_url":"https://api.github.com/users/ivanarrizabalaga/following{/other_user}","gists_url":"https://api.github.com/users/ivanarrizabalaga/gists{/gist_id}","starred_url":"https://api.github.com/users/ivanarrizabalaga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivanarrizabalaga/subscriptions","organizations_url":"https://api.github.com/users/ivanarrizabalaga/orgs","repos_url":"https://api.github.com/users/ivanarrizabalaga/repos","events_url":"https://api.github.com/users/ivanarrizabalaga/events{/privacy}","received_events_url":"https://api.github.com/users/ivanarrizabalaga/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-13T07:21:44Z","updated_at":"2015-10-21T14:55:05Z","closed_at":"2015-10-21T14:55:05Z","body":"Since I need to register once my user has logged in to the app I've noticed that the callbacks are invoked many times (1 per login).\r\nSupposedly I should be able to register my listeners once (via init) and if I call **$ionicPush.register()** without any callback that should be just enough.\r\n\r\nThe problem is that the register function, when you're in dev mode, always invokes **callbackRegistration** so you end up with many alerts (as many as logins) while you're developing.\r\n\r\n![register_sets_callback_any_time](https://cloud.githubusercontent.com/assets/4146319/10448237/b370c546-718b-11e5-9da0-30335b91e81d.png)\r\n"}}