{"action":"created","issue":{"url":"https://api.github.com/repos/driftyco/ionic/issues/7563","repository_url":"https://api.github.com/repos/driftyco/ionic","labels_url":"https://api.github.com/repos/driftyco/ionic/issues/7563/labels{/name}","comments_url":"https://api.github.com/repos/driftyco/ionic/issues/7563/comments","events_url":"https://api.github.com/repos/driftyco/ionic/issues/7563/events","html_url":"https://github.com/driftyco/ionic/issues/7563","id":169691749,"number":7563,"title":"Overlays in 2.0.0-beta.11","user":{"login":"jimitndiaye","id":316325,"avatar_url":"https://avatars.githubusercontent.com/u/316325?v=3","gravatar_id":"","url":"https://api.github.com/users/jimitndiaye","html_url":"https://github.com/jimitndiaye","followers_url":"https://api.github.com/users/jimitndiaye/followers","following_url":"https://api.github.com/users/jimitndiaye/following{/other_user}","gists_url":"https://api.github.com/users/jimitndiaye/gists{/gist_id}","starred_url":"https://api.github.com/users/jimitndiaye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimitndiaye/subscriptions","organizations_url":"https://api.github.com/users/jimitndiaye/orgs","repos_url":"https://api.github.com/users/jimitndiaye/repos","events_url":"https://api.github.com/users/jimitndiaye/events{/privacy}","received_events_url":"https://api.github.com/users/jimitndiaye/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/driftyco/ionic/labels/alert","name":"alert","color":"fbca04"},{"url":"https://api.github.com/repos/driftyco/ionic/labels/v2","name":"v2","color":"313744"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":17,"created_at":"2016-08-05T20:39:18Z","updated_at":"2016-08-09T17:42:36Z","closed_at":null,"body":"\r\n\r\n#### Short description of the problem:\r\nAfter upgrading to beta.11 (which I had to do because it finally brings support for @angular/forms) and applying the code changes suggested in the upgrade guide (use ```AlertController.create```, and ```alert.present``` rather than ```NavController.present```) my app is broken. I think this is because of the decision to make overlays global (app-wide) rather than constrained by the containing NavController.\r\n\r\nRunning the following code in my app results in an error (the same code used to work in beta.10 using nav.present):\r\n```\r\nconst alert = this.alertController.create({/*some options*/);\r\nalert.present().\r\n```\r\nThe above code results in the following error:\r\n```\r\nTypeError: Cannot read property 'insertViews' of undefined\r\n    at App.present (eval at <anonymous> (main.bundle.js:1), <anonymous>:171:28)\r\n    at Alert.present (eval at <anonymous> (main.bundle.js:1), <anonymous>:98:26)\r\n    at DialogExplorerComponent.addNode (eval at 1473 (1.chunk.js:1), <anonymous>:138:16)\r\n```\r\nStepping through the code in the debug console reveals that the ```_portal``` field of that App instance is undefined:\r\n[image](http://imgur.com/a/9hY5F)\r\n\r\nIs there some way of using the beta.11 API to achieve the same behavior as beta.10, that is, having overlays be constrained by their containing NavController rather than app-wide as in beta 11?\r\n\r\n#### What behavior are you expecting?\r\nThat I'd be able to use overlays like Alert, Toast as I could in beta.10.\r\n\r\n**Which Ionic Version?** 1.x or 2.x\r\n2.0.0-beta.11\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/driftyco/ionic/issues/comments/238631719","html_url":"https://github.com/driftyco/ionic/issues/7563#issuecomment-238631719","issue_url":"https://api.github.com/repos/driftyco/ionic/issues/7563","id":238631719,"user":{"login":"jgw96","id":8823093,"avatar_url":"https://avatars.githubusercontent.com/u/8823093?v=3","gravatar_id":"","url":"https://api.github.com/users/jgw96","html_url":"https://github.com/jgw96","followers_url":"https://api.github.com/users/jgw96/followers","following_url":"https://api.github.com/users/jgw96/following{/other_user}","gists_url":"https://api.github.com/users/jgw96/gists{/gist_id}","starred_url":"https://api.github.com/users/jgw96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgw96/subscriptions","organizations_url":"https://api.github.com/users/jgw96/orgs","repos_url":"https://api.github.com/users/jgw96/repos","events_url":"https://api.github.com/users/jgw96/events{/privacy}","received_events_url":"https://api.github.com/users/jgw96/received_events","type":"User","site_admin":false},"created_at":"2016-08-09T17:42:36Z","updated_at":"2016-08-09T17:42:36Z","body":"@jimitndiaye ahh, this may very well be the issue then. Ionic 2 is not currently built to work with the Angular router and since your displaying the ionic part of your app in a `router-outlet` it is going to cause issues. "}}
{"actor":{"display_login":"jgw96"}}