{"action":"created","issue":{"url":"https://api.github.com/repos/driftyco/ionic/issues/9563","repository_url":"https://api.github.com/repos/driftyco/ionic","labels_url":"https://api.github.com/repos/driftyco/ionic/issues/9563/labels{/name}","comments_url":"https://api.github.com/repos/driftyco/ionic/issues/9563/comments","events_url":"https://api.github.com/repos/driftyco/ionic/issues/9563/events","html_url":"https://github.com/driftyco/ionic/issues/9563","id":194528711,"number":9563,"title":"Allow IonicModule to be imported multiple times","user":{"login":"jvitor83","id":3493339,"avatar_url":"https://avatars.githubusercontent.com/u/3493339?v=3","gravatar_id":"","url":"https://api.github.com/users/jvitor83","html_url":"https://github.com/jvitor83","followers_url":"https://api.github.com/users/jvitor83/followers","following_url":"https://api.github.com/users/jvitor83/following{/other_user}","gists_url":"https://api.github.com/users/jvitor83/gists{/gist_id}","starred_url":"https://api.github.com/users/jvitor83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvitor83/subscriptions","organizations_url":"https://api.github.com/users/jvitor83/orgs","repos_url":"https://api.github.com/users/jvitor83/repos","events_url":"https://api.github.com/users/jvitor83/events{/privacy}","received_events_url":"https://api.github.com/users/jvitor83/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-09T07:11:27Z","updated_at":"2016-12-09T20:14:36Z","closed_at":null,"body":"**Ionic version:**  (check one with \"x\")\r\n[ ] **1.x**\r\n[x] **2.x**\r\n\r\n**I'm submitting a ...**  (check one with \"x\")\r\n[ ] bug report\r\n[x] feature request\r\n[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/\r\n\r\n**Current behavior:**\r\nIf i use the Angular 2 router instead of Ionic 2 and try to import a Module with ionic components (and of course importing IonicModule) it not work because of: \"**Error: BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead**\".\r\n\r\n**Expected behavior:**\r\nNot give error when importing at AppModule a second module that has importing IonicModule.\r\nAllow to import IonicModule at multiples Modules (not only the root).\r\n\r\n**Steps to reproduce:**\r\nCreate a sidemenu ionic2 project and create another angular2 module which import the IonicModule. Then try to import that module and use the angular router to navigate to some component inside this module.\r\nor\r\nClone this https://github.com/jvitor83/angular-seed-cli-admin/tree/ionic-integration **ionic-integration branch** has the issue. My DashboardModule has IonicModule imported (to make it find the ion components) but gets the error informed. **Changing the IonicModule from BrowserModule to CommonModule _(and including the BrowserModule at the AppModule)_ solve the problem**.\r\n\r\n**Related code:**\r\nThis commit has the change who make this work:\r\nhttps://github.com/jvitor83/ionic/commit/9ea21b0fad16e95b16deb48ab0fd67dda8affa62\r\nChanging from BrowserModule for CommonModule allow to import into multiple modules.\r\nAlternative scenario where using angular router and lazy loading modules.\r\n\r\n\r\n\r\n\r\n**What i am asking is to the core ionic team to stop the IonicModule from importing the BrowserModule and use the CommonModule instead, since it has no impact and allow reuse.**"},"comment":{"url":"https://api.github.com/repos/driftyco/ionic/issues/comments/266111931","html_url":"https://github.com/driftyco/ionic/issues/9563#issuecomment-266111931","issue_url":"https://api.github.com/repos/driftyco/ionic/issues/9563","id":266111931,"user":{"login":"mhartington","id":2835826,"avatar_url":"https://avatars.githubusercontent.com/u/2835826?v=3","gravatar_id":"","url":"https://api.github.com/users/mhartington","html_url":"https://github.com/mhartington","followers_url":"https://api.github.com/users/mhartington/followers","following_url":"https://api.github.com/users/mhartington/following{/other_user}","gists_url":"https://api.github.com/users/mhartington/gists{/gist_id}","starred_url":"https://api.github.com/users/mhartington/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhartington/subscriptions","organizations_url":"https://api.github.com/users/mhartington/orgs","repos_url":"https://api.github.com/users/mhartington/repos","events_url":"https://api.github.com/users/mhartington/events{/privacy}","received_events_url":"https://api.github.com/users/mhartington/received_events","type":"User","site_admin":false},"created_at":"2016-12-09T20:14:36Z","updated_at":"2016-12-09T20:14:36Z","body":">If i use the Angular 2 router instead\r\n\r\nThe Angular 2 router is not compatible with Ionic 2 and cannot/should not be used.\r\n\r\n> use the CommonModule instead\r\n\r\nWe can look into this"}}
{"actor":{"display_login":"mhartington"}}