Vincent Fournier 5d87fdaacd Improve code naming
Change-Id: If4837f71caca6d594e141fff830c7c2c08376e03
2015-08-24 20:33:27 -04:00

23 lines
815 B
JavaScript

'use strict';
angular.module('bansho.actionbar', ['bansho.datasource', 'bansho.surveil', 'bansho.notifications'])
.directive('banshoActionbar', ['$compile', function ($compile) {
return {
restrict: 'E',
scope: {
options: '='
},
templateUrl: 'components/custom_directive/actionbar/actionbar.html',
link: function (scope, element) {
scope.datasourceId = scope.options.attributes.datasourceId;
scope.components = scope.options.components;
angular.forEach(scope.components, function (component) {
component.attributes.datasourceId = scope.datasourceId;
});
$compile(element.contents())(scope);
}
};
}]);