diff --git a/panel/scopes/scopes.js b/panel/scopes/scopes.js index c886b57..8032c93 100644 --- a/panel/scopes/scopes.js +++ b/panel/scopes/scopes.js @@ -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); });