Files
awx/awx/ui/client/lib/components/list/list.directive.js
2018-04-19 18:15:35 -04:00

32 lines
710 B
JavaScript

const templateUrl = require('~components/list/list.partial.html');
function atListLink (scope, element, attrs) {
if (!attrs.results) {
throw new Error('at-list directive requires results attr to set up the empty list properly');
}
}
function AtListController (strings) {
this.strings = strings;
}
AtListController.$inject = ['ComponentsStrings'];
function atList () {
return {
restrict: 'E',
replace: true,
transclude: true,
templateUrl,
scope: {
results: '=',
emptyListReason: '@'
},
link: atListLink,
controller: AtListController,
controllerAs: 'vm',
};
}
export default atList;