Vincent Fournier 844d9e0e6e Clean config.js and remove container
Change-Id: Ieeb6980232c02ec72a6a0caa707dddbacb008a6f
2015-08-26 16:45:55 -04:00

24 lines
888 B
JavaScript

'use strict';
angular.module('bansho.hostTree', ['bansho.datasource'])
.directive('banshoHostTree', function () {
return {
restrict: 'E',
scope: {
options: '='
},
templateUrl: 'components/custom_directive/host_tree/host_tree.html',
controller: ['$scope', 'sharedData',
function ($scope, sharedData) {
$scope.sources = {};
angular.forEach($scope.options.attributes.inputSource, function (source) {
$scope.sources[source] = sharedData.getDataFromInputSource(source, false, null, false, function (data) {
$scope.sources[source] = data;
});
});
$scope.components = $scope.options.components;
}]
};
});