This code requires the fix to angular-hint submitted as pull request https://github.com/angular/angular-hint/pull/90 (It is very easy to manually patch the hint.js file in the Batarang project with this fix for testing purposes also.)
Destroyed scopes were not being removed from the scope tree. The background.js and inspectedApp code that handled the scope:destroy message was buggy, referencing undefined variables and also not tracking the descendants of the destroyed scopes. This code fixes both issues. All descendants are now present on the scope:destroy message broadcast throughout Batarang. This reduces code that would need repeated in background.js, inspectedApp and probably in future scope.tree.js to fix https://github.com/angular/angularjs-batarang/blob/master/panel/components/scope-tree/scope-tree.js#L77
This code requires the fix to angular-hint submitted as pull request https://github.com/angular/angular-hint/pull/90 (It is very easy to manually patch the hint.js file in the Batarang project with this fix for testing purposes also.)
Destroyed scopes were not being removed from the scope tree. The background.js and inspectedApp code that handled the scope:destroy message was buggy, referencing undefined variables and also not tracking the descendants of the destroyed scopes. This code fixes both issues. All descendants are now present on the scope:destroy message broadcast throughout Batarang. This reduces code that would need repeated in background.js, inspectedApp and probably in future scope.tree.js to fix https://github.com/angular/angularjs-batarang/blob/master/panel/components/scope-tree/scope-tree.js#L77