salix/front/core/components/card/card.js

19 lines
552 B
JavaScript

import ngModule from '../../module';
require('./style.scss');
export default function directive() {
return {
restrict: 'E',
transclude: true,
template: require('./card.html'),
link: function($scope, $element, $attrs, $ctrl, $transclude) {
$element.addClass('demo-card-wide vn-shadow bg-panel');
$transclude($scope, function(clone) {
angular.element($element[0].querySelector('div')).append(clone);
});
}
};
}
ngModule.directive('vnCard', directive);