Github user tbouron commented on a diff in the pull request:
https://github.com/apache/brooklyn-ui/pull/106#discussion_r232209479
--- Diff:
ui-modules/blueprint-composer/app/components/catalog-saver/catalog-saver.directive.js
---
@@ -64,8 +64,44 @@ export function saveToCatalogModalDirective($rootScope,
$uibModal, $injector, co
$scope.buttonText = $scope.config.label || ($scope.config.itemType
? `Update ${$scope.config.name || $scope.config.symbolicName}` : 'Add to
catalog');
$scope.activateModal = () => {
- // Override callback to update catalog configuration data in
other applications
- $scope.config = (composerOverrides.updateCatalogConfig ||
(($scope, $element) => $scope.config))($scope, $element);
+ function injectorGet(reference) { return
$element.injector().get(reference); }
+ let blueprintService = injectorGet('blueprintService');
--- End diff --
Instead of using the `$injector`, you can inject `blueprintService`
directly in `saveToCatalogModalDirective`
---