Files
coriolis/app/js/directives/directive-component-select.js
Colin McLeod 1097ca5a42 Initial commit
2015-04-16 18:29:29 -07:00

17 lines
390 B
JavaScript

angular.module('app').directive('componentSelect', [ function() {
return {
restrict: 'A',
scope:{
opts: '=',
c: '=',
ship: '='
},
templateUrl: 'views/component_select.html',
link: function (scope) {
scope.use = function(id, componentData) {
scope.ship.use(scope.c, id, componentData);
// hide this shit;
};
}
};
}]);