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

24 lines
868 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, function (data) {
$scope.sources[source] = data;
});
});
$scope.components = $scope.options.components;
}]
};
});