bansho/app/components/directive/container/info/info.js

22 lines
754 B
JavaScript

'use strict';
angular.module('bansho.container')
.directive('banshoInfo', function () {
return {
restrict: 'E',
templateUrl: 'components/directive/container/info/info.html',
link: function (scope) {
scope.param = scope.$parent.param;
angular.forEach(scope.components, function(component) {
if (component.type === 'info') {
scope.inputSources = component.attributes.inputSource;
}
});
angular.forEach(scope.inputSources, function (inputSource) {
scope.$parent.addDirectiveParamRequirements(inputSource);
});
}
};
});