feat(panel/scopes): expand models pane when first scope is selected

test-unit-sauce
Brian Ford 10 years ago
parent 727ab2da9c
commit 2768929c9c

@ -16,6 +16,14 @@ function ScopesController($scope, inspectedApp) {
$scope.inspectedScope = null;
// expand models the fist time we inspect a scope
var cancelWatch = $scope.$watch('inspectedScope', function (newScope) {
if (newScope) {
$scope.modelsExpanded = true;
cancelWatch();
}
})
$scope.$on('inspected-scope:change', function (ev, data) {
inspectScope(data.id);
});