{"action":"opened","issue":{"url":"https://api.github.com/repos/sarriaroman/FabricPlugin/issues/61","repository_url":"https://api.github.com/repos/sarriaroman/FabricPlugin","labels_url":"https://api.github.com/repos/sarriaroman/FabricPlugin/issues/61/labels{/name}","comments_url":"https://api.github.com/repos/sarriaroman/FabricPlugin/issues/61/comments","events_url":"https://api.github.com/repos/sarriaroman/FabricPlugin/issues/61/events","html_url":"https://github.com/sarriaroman/FabricPlugin/issues/61","id":173603462,"number":61,"title":"Ionic2 / Fabric","user":{"login":"mehrshadpezeshk","id":351877,"avatar_url":"https://avatars.githubusercontent.com/u/351877?v=3","gravatar_id":"","url":"https://api.github.com/users/mehrshadpezeshk","html_url":"https://github.com/mehrshadpezeshk","followers_url":"https://api.github.com/users/mehrshadpezeshk/followers","following_url":"https://api.github.com/users/mehrshadpezeshk/following{/other_user}","gists_url":"https://api.github.com/users/mehrshadpezeshk/gists{/gist_id}","starred_url":"https://api.github.com/users/mehrshadpezeshk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mehrshadpezeshk/subscriptions","organizations_url":"https://api.github.com/users/mehrshadpezeshk/orgs","repos_url":"https://api.github.com/users/mehrshadpezeshk/repos","events_url":"https://api.github.com/users/mehrshadpezeshk/events{/privacy}","received_events_url":"https://api.github.com/users/mehrshadpezeshk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-27T16:22:29Z","updated_at":"2016-08-27T16:22:29Z","closed_at":null,"body":"Hello,\r\n\r\nPlease let me know how do i need to use the plugin on Ionic2, here's my code : \r\n\r\nimport {Component} from '@angular/core';\r\nimport {Platform, ionicBootstrap} from 'ionic-angular';\r\nimport {StatusBar, Push} from 'ionic-native';\r\nimport {TabsPage} from './pages/tabs/tabs';\r\nimport {HTTP_PROVIDERS} from '@angular/http';\r\nimport {CloudSettings, provideCloud} from '@ionic/cloud-angular';\r\n\r\n\r\n\r\nconst cloudSettings: CloudSettings = {\r\n  'core': {\r\n    'app_id': '363e500b'\r\n  }\r\n};\r\n\r\n\r\n@Component({\r\n  template: '<ion-nav [root]=\"rootPage\"></ion-nav>',\r\n  providers: [HTTP_PROVIDERS]\r\n})\r\nexport class MyApp {\r\n\r\n  private rootPage: any;\r\n\r\n  constructor(private platform: Platform) {\r\n    this.rootPage = TabsPage;\r\n\r\n    platform.ready().then(() => {\r\n\r\n      StatusBar.styleDefault();\r\n\r\n      var push = Push.init({\r\n        ios: {\r\n          alert: \"true\",\r\n          badge: true,\r\n          sound: 'false'\r\n        }\r\n      });\r\n\r\n      push.on('registration', (data) => {\r\n        console.log(data.registrationId);\r\n        alert(data.registrationId.toString());\r\n      });\r\n\r\n      push.on('notification', (data) => {\r\n        console.log(data);\r\n        alert(\"Hi, Am a push notification\");\r\n      });\r\n\r\n      push.on('error', (e) => {\r\n        console.log(e.message);\r\n      });\r\n\r\n\r\n    });\r\n  }\r\n}\r\n\r\nionicBootstrap(MyApp, [provideCloud(cloudSettings)]);\r\n\r\nThanks\r\n"}}
{"actor":{"display_login":"mehrshadpezeshk"}}