|
@@ -60,14 +60,16 @@ function (angular, _) {
|
|
|
loadController(name);
|
|
loadController(name);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- $scope.$watch(attr.panel, function (panel) {
|
|
|
|
|
- // If the panel attribute is specified, create a new scope. This ruins configuration
|
|
|
|
|
- // so don't do it with anything that needs to use editor.html
|
|
|
|
|
- if(!_.isUndefined(panel)) {
|
|
|
|
|
- $scope = $scope.$new();
|
|
|
|
|
- $scope.panel = angular.fromJson(panel);
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ if(attr.panel) {
|
|
|
|
|
+ $scope.$watch(attr.panel, function (panel) {
|
|
|
|
|
+ // If the panel attribute is specified, create a new scope. This ruins configuration
|
|
|
|
|
+ // so don't do it with anything that needs to use editor.html
|
|
|
|
|
+ if(!_.isUndefined(panel)) {
|
|
|
|
|
+ $scope = $scope.$new();
|
|
|
|
|
+ $scope.panel = angular.fromJson(panel);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
});
|
|
});
|