Vincent Fournier f1b6d5d552 Rename files to conform with standard
Change-Id: Ia3914eaeb81093a44124e0c3c10ad681276aa866
2015-08-17 18:37:29 -04:00

24 lines
861 B
JavaScript

'use strict';
angular.module('bansho.hostTree', ['bansho.datasource'])
.directive('banshoHostTree', function () {
return {
restrict: 'E',
scope: {
options: '='
},
templateUrl: 'components/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, function (data) {
$scope.sources[source] = data;
});
});
$scope.components = $scope.options.components;
}]
};
});