{"action":"closed","issue":{"url":"https://api.github.com/repos/driftyco/ionic/issues/7256","repository_url":"https://api.github.com/repos/driftyco/ionic","labels_url":"https://api.github.com/repos/driftyco/ionic/issues/7256/labels{/name}","comments_url":"https://api.github.com/repos/driftyco/ionic/issues/7256/comments","events_url":"https://api.github.com/repos/driftyco/ionic/issues/7256/events","html_url":"https://github.com/driftyco/ionic/issues/7256","id":164691023,"number":7256,"title":"v2 beta.10 NavController.indexOf() returns -1 for Loading component","user":{"login":"jasonwaters","id":427213,"avatar_url":"https://avatars.githubusercontent.com/u/427213?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonwaters","html_url":"https://github.com/jasonwaters","followers_url":"https://api.github.com/users/jasonwaters/followers","following_url":"https://api.github.com/users/jasonwaters/following{/other_user}","gists_url":"https://api.github.com/users/jasonwaters/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonwaters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonwaters/subscriptions","organizations_url":"https://api.github.com/users/jasonwaters/orgs","repos_url":"https://api.github.com/users/jasonwaters/repos","events_url":"https://api.github.com/users/jasonwaters/events{/privacy}","received_events_url":"https://api.github.com/users/jasonwaters/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/driftyco/ionic/labels/v2","name":"v2","color":"313744"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-09T23:42:11Z","updated_at":"2016-07-12T14:18:11Z","closed_at":"2016-07-12T14:18:11Z","body":"In my app, the root component listens for loading events and instantiates a Loading component like this:\r\n\r\n```\r\nlet this.loadingComponent = Loading.create({...})`;\r\nthis.nav.present(this.loadingComponent);\r\n```\r\n\r\nThis happens in my root App component where nav is `@ViewChild(Nav) nav:Nav;`\r\n\r\nAnyway, when loading stops, it attempts to destroy the loading component by doing something like this:\r\n\r\n```\r\nlet index:number = this.nav.indexOf(this.loadingComponent);\r\nthis.nav.remove(index, 1).then(() => this.loadingComponent = void 0);\r\n```\r\n\r\nThe problem is, indexOf always returns -1 for some reason.  This code worked great prior to beta.10."}}
{"actor":{"display_login":"jgw96"}}