{"action":"created","issue":{"url":"https://api.github.com/repos/krispo/angular-nvd3/issues/178","labels_url":"https://api.github.com/repos/krispo/angular-nvd3/issues/178/labels{/name}","comments_url":"https://api.github.com/repos/krispo/angular-nvd3/issues/178/comments","events_url":"https://api.github.com/repos/krispo/angular-nvd3/issues/178/events","html_url":"https://github.com/krispo/angular-nvd3/pull/178","id":94780201,"number":178,"title":"remove window resize listener when directive is destroyed","user":{"login":"hawkup","id":2748846,"avatar_url":"https://avatars.githubusercontent.com/u/2748846?v=3","gravatar_id":"","url":"https://api.github.com/users/hawkup","html_url":"https://github.com/hawkup","followers_url":"https://api.github.com/users/hawkup/followers","following_url":"https://api.github.com/users/hawkup/following{/other_user}","gists_url":"https://api.github.com/users/hawkup/gists{/gist_id}","starred_url":"https://api.github.com/users/hawkup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hawkup/subscriptions","organizations_url":"https://api.github.com/users/hawkup/orgs","repos_url":"https://api.github.com/users/hawkup/repos","events_url":"https://api.github.com/users/hawkup/events{/privacy}","received_events_url":"https://api.github.com/users/hawkup/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-13T18:21:23Z","updated_at":"2015-07-15T14:55:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/krispo/angular-nvd3/pulls/178","html_url":"https://github.com/krispo/angular-nvd3/pull/178","diff_url":"https://github.com/krispo/angular-nvd3/pull/178.diff","patch_url":"https://github.com/krispo/angular-nvd3/pull/178.patch"},"body":"In this plunker : http://run.plnkr.co/plunks/NKWOH6tXvR2680WdRsF8/\r\nwhen click at \"tab2\" button for switch tab then resize the window. I found this error\r\n\"Uncaught TypeError: Cannot read property 'update' of null\" because when directive is destroyed, It doesn't remove resize window listener. I added remove listener code at clearElement function to fix this."},"comment":{"url":"https://api.github.com/repos/krispo/angular-nvd3/issues/comments/121642968","html_url":"https://github.com/krispo/angular-nvd3/pull/178#issuecomment-121642968","issue_url":"https://api.github.com/repos/krispo/angular-nvd3/issues/178","id":121642968,"user":{"login":"serslon","id":4667761,"avatar_url":"https://avatars.githubusercontent.com/u/4667761?v=3","gravatar_id":"","url":"https://api.github.com/users/serslon","html_url":"https://github.com/serslon","followers_url":"https://api.github.com/users/serslon/followers","following_url":"https://api.github.com/users/serslon/following{/other_user}","gists_url":"https://api.github.com/users/serslon/gists{/gist_id}","starred_url":"https://api.github.com/users/serslon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serslon/subscriptions","organizations_url":"https://api.github.com/users/serslon/orgs","repos_url":"https://api.github.com/users/serslon/repos","events_url":"https://api.github.com/users/serslon/events{/privacy}","received_events_url":"https://api.github.com/users/serslon/received_events","type":"User","site_admin":false},"created_at":"2015-07-15T14:55:52Z","updated_at":"2015-07-15T14:55:52Z","body":":+1: \r\nThere is also a problem if off the page where there is a chart in the console there is a message:\r\nangular-nvd3.js:148 Uncaught TypeError: Cannot set property 'resizeHandler' of null\r\nangular-nvd3.js:148 Uncaught TypeError: Cannot read property 'update' of null"}}