{"action":"created","issue":{"url":"https://api.github.com/repos/likeastore/ngDialog/issues/202","labels_url":"https://api.github.com/repos/likeastore/ngDialog/issues/202/labels{/name}","comments_url":"https://api.github.com/repos/likeastore/ngDialog/issues/202/comments","events_url":"https://api.github.com/repos/likeastore/ngDialog/issues/202/events","html_url":"https://github.com/likeastore/ngDialog/issues/202","id":65622295,"number":202,"title":"Opening a dialog immediately after `closeAll()` destroys the wrong scope","user":{"login":"richardszalay","id":229467,"avatar_url":"https://avatars.githubusercontent.com/u/229467?v=3","gravatar_id":"","url":"https://api.github.com/users/richardszalay","html_url":"https://github.com/richardszalay","followers_url":"https://api.github.com/users/richardszalay/followers","following_url":"https://api.github.com/users/richardszalay/following{/other_user}","gists_url":"https://api.github.com/users/richardszalay/gists{/gist_id}","starred_url":"https://api.github.com/users/richardszalay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardszalay/subscriptions","organizations_url":"https://api.github.com/users/richardszalay/orgs","repos_url":"https://api.github.com/users/richardszalay/repos","events_url":"https://api.github.com/users/richardszalay/events{/privacy}","received_events_url":"https://api.github.com/users/richardszalay/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-01T07:24:48Z","updated_at":"2015-06-11T22:40:02Z","closed_at":"2015-06-11T22:40:02Z","body":"If you invoke `closeAll()` and then immediately open a new dialog, any calls to `closeThisDialog` on the new dialog won't work.\r\n\r\nThe root cause of that the `scope` variable in ngDialog is scoped to the entire component and therefore essentially \"global\" state (between dialog instances). Since scope can be retrieved from `element.scope()`, it would make much more sense to localise the (js) scope of the (angular) scope variable.\r\n\r\nPR incoming."},"comment":{"url":"https://api.github.com/repos/likeastore/ngDialog/issues/comments/111295688","html_url":"https://github.com/likeastore/ngDialog/issues/202#issuecomment-111295688","issue_url":"https://api.github.com/repos/likeastore/ngDialog/issues/202","id":111295688,"user":{"login":"egor-smirnov","id":1039155,"avatar_url":"https://avatars.githubusercontent.com/u/1039155?v=3","gravatar_id":"","url":"https://api.github.com/users/egor-smirnov","html_url":"https://github.com/egor-smirnov","followers_url":"https://api.github.com/users/egor-smirnov/followers","following_url":"https://api.github.com/users/egor-smirnov/following{/other_user}","gists_url":"https://api.github.com/users/egor-smirnov/gists{/gist_id}","starred_url":"https://api.github.com/users/egor-smirnov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/egor-smirnov/subscriptions","organizations_url":"https://api.github.com/users/egor-smirnov/orgs","repos_url":"https://api.github.com/users/egor-smirnov/repos","events_url":"https://api.github.com/users/egor-smirnov/events{/privacy}","received_events_url":"https://api.github.com/users/egor-smirnov/received_events","type":"User","site_admin":false},"created_at":"2015-06-11T22:40:02Z","updated_at":"2015-06-11T22:40:02Z","body":"Fixed in PR."}}