{"action":"created","issue":{"url":"https://api.github.com/repos/angular-ui/ui-router/issues/2405","labels_url":"https://api.github.com/repos/angular-ui/ui-router/issues/2405/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/ui-router/issues/2405/comments","events_url":"https://api.github.com/repos/angular-ui/ui-router/issues/2405/events","html_url":"https://github.com/angular-ui/ui-router/issues/2405","id":119568733,"number":2405,"title":"Multiple Named Views + Destroy $scope","user":{"login":"jkossis","id":1247832,"avatar_url":"https://avatars.githubusercontent.com/u/1247832?v=3","gravatar_id":"","url":"https://api.github.com/users/jkossis","html_url":"https://github.com/jkossis","followers_url":"https://api.github.com/users/jkossis/followers","following_url":"https://api.github.com/users/jkossis/following{/other_user}","gists_url":"https://api.github.com/users/jkossis/gists{/gist_id}","starred_url":"https://api.github.com/users/jkossis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkossis/subscriptions","organizations_url":"https://api.github.com/users/jkossis/orgs","repos_url":"https://api.github.com/users/jkossis/repos","events_url":"https://api.github.com/users/jkossis/events{/privacy}","received_events_url":"https://api.github.com/users/jkossis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-30T20:03:04Z","updated_at":"2015-12-01T12:21:39Z","closed_at":null,"body":"If I am using a state with multiple views, how do I destroy one of the view's scopes? I tried the following and it did not work:\r\n\r\n```html\r\n<div ng-if='showFilters' ui-view=\"filters\"></div>\r\n<div ui-view=\"tabledata\"></div>\r\n<div ui-view=\"graph\"></div>\r\n```\r\n\r\nEven when $scope.showFilters set to false, the scope for the 'filters' view still exists. I wonder if the ng-if is only destroying its child scope, but doesn't know about the ui-view's scope. I appreciate the help."},"comment":{"url":"https://api.github.com/repos/angular-ui/ui-router/issues/comments/160952211","html_url":"https://github.com/angular-ui/ui-router/issues/2405#issuecomment-160952211","issue_url":"https://api.github.com/repos/angular-ui/ui-router/issues/2405","id":160952211,"user":{"login":"zanettin","id":3241476,"avatar_url":"https://avatars.githubusercontent.com/u/3241476?v=3","gravatar_id":"","url":"https://api.github.com/users/zanettin","html_url":"https://github.com/zanettin","followers_url":"https://api.github.com/users/zanettin/followers","following_url":"https://api.github.com/users/zanettin/following{/other_user}","gists_url":"https://api.github.com/users/zanettin/gists{/gist_id}","starred_url":"https://api.github.com/users/zanettin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zanettin/subscriptions","organizations_url":"https://api.github.com/users/zanettin/orgs","repos_url":"https://api.github.com/users/zanettin/repos","events_url":"https://api.github.com/users/zanettin/events{/privacy}","received_events_url":"https://api.github.com/users/zanettin/received_events","type":"User","site_admin":false},"created_at":"2015-12-01T12:21:39Z","updated_at":"2015-12-01T12:21:39Z","body":"What I was thinking off is, that you not just toggle the visibility of the ui-view, but change the state. Say you have state A with all ui views defined. In state A.B you get all the settings from the parent A but you can remove the views you not want. B.views { 'filter@' : { controller : null, template : '' }} hope I understand you right"}}