{"action":"created","issue":{"url":"https://api.github.com/repos/driftyco/ionic-cloud/issues/51","repository_url":"https://api.github.com/repos/driftyco/ionic-cloud","labels_url":"https://api.github.com/repos/driftyco/ionic-cloud/issues/51/labels{/name}","comments_url":"https://api.github.com/repos/driftyco/ionic-cloud/issues/51/comments","events_url":"https://api.github.com/repos/driftyco/ionic-cloud/issues/51/events","html_url":"https://github.com/driftyco/ionic-cloud/issues/51","id":178079698,"number":51,"title":"Handle a notifications - Push not emitting inside my App","user":{"login":"RonSB","id":22323996,"avatar_url":"https://avatars.githubusercontent.com/u/22323996?v=3","gravatar_id":"","url":"https://api.github.com/users/RonSB","html_url":"https://github.com/RonSB","followers_url":"https://api.github.com/users/RonSB/followers","following_url":"https://api.github.com/users/RonSB/following{/other_user}","gists_url":"https://api.github.com/users/RonSB/gists{/gist_id}","starred_url":"https://api.github.com/users/RonSB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RonSB/subscriptions","organizations_url":"https://api.github.com/users/RonSB/orgs","repos_url":"https://api.github.com/users/RonSB/repos","events_url":"https://api.github.com/users/RonSB/events{/privacy}","received_events_url":"https://api.github.com/users/RonSB/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2016-09-20T14:40:49Z","updated_at":"2016-12-23T13:18:28Z","closed_at":"2016-10-07T12:05:27Z","body":"Hi,\nMy app was Ionic version 1 and the notifications worked well, I followed all the [migration ](http://docs.ionic.io/migration.html) steps, and it works only when the app is closed/background.\n\nMy app is Ionic 1, I updated to the latest CLI 2.0.0, delete all references to the ionic-platform-web-client.\n\nI place the listener to the 'cloud:push:notification'\n\n```\n$scope.$on('cloud:push:notification', function(event, data) {\n    var msg = data.message;\n    alert(msg.title + ': ' + msg.text);\n });\n```\n\nUse this different method to handle the notification on my controller, or where I have to put this method ?:\n\n```\n$ionicEventEmitter.on('push:notification', function(data) {\n     console.log(data.message);\n});\n\n```\n\nI removed the ionic cloud and the phonegap-plugin-push and I installed them again (ionic cloud 0.9.0).\n\nAfter trying all this my problem persists, does anyone have any solution?\n"},"comment":{"url":"https://api.github.com/repos/driftyco/ionic-cloud/issues/comments/268988557","html_url":"https://github.com/driftyco/ionic-cloud/issues/51#issuecomment-268988557","issue_url":"https://api.github.com/repos/driftyco/ionic-cloud/issues/51","id":268988557,"user":{"login":"Lestt","id":1737422,"avatar_url":"https://avatars.githubusercontent.com/u/1737422?v=3","gravatar_id":"","url":"https://api.github.com/users/Lestt","html_url":"https://github.com/Lestt","followers_url":"https://api.github.com/users/Lestt/followers","following_url":"https://api.github.com/users/Lestt/following{/other_user}","gists_url":"https://api.github.com/users/Lestt/gists{/gist_id}","starred_url":"https://api.github.com/users/Lestt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lestt/subscriptions","organizations_url":"https://api.github.com/users/Lestt/orgs","repos_url":"https://api.github.com/users/Lestt/repos","events_url":"https://api.github.com/users/Lestt/events{/privacy}","received_events_url":"https://api.github.com/users/Lestt/received_events","type":"User","site_admin":false},"created_at":"2016-12-23T13:18:28Z","updated_at":"2016-12-23T13:18:28Z","body":"First, thank you @ericb for your work.\r\nI found why I didn't get the event. The thing is i am testing my app with livereload. I initialized the push plugin only when the user log in. So in my case, when i use livereload, all the data stored in localStorage (concerning my app or push notifications) are present, but i don't call the code to initialize it between 2 livereload sessions. Then no event is fired.\r\nI re-tested and each time i saved my code and livereload reloaded the app, i logged out and logged into my app, and the event is fired as expected.\r\nI don't know if this should be mentioned somewhere in the doc, and if this behavior seems normal for you.\r\n\r\nThanks for your time ... and Merry Christmas and happy new year!"}}
{"actor":{"display_login":"Lestt"}}