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

19 lines
558 B
JavaScript
Raw Normal View History

2018-02-10 15:18:01 +00:00
import ngModule from '../../module';
2018-03-01 22:38:14 +00:00
require('./style.scss');
2018-02-10 15:18:01 +00:00
2019-09-30 09:30:54 +00:00
export default function directive() {
2018-02-10 15:18:01 +00:00
return {
restrict: 'E',
transclude: true,
2018-03-01 22:38:14 +00:00
template: require('./card.html'),
link: function($scope, $element, $attrs, $ctrl, $transclude) {
2018-03-01 22:38:14 +00:00
$element.addClass('demo-card-wide mdl-shadow--2dp bg-panel');
$transclude($scope, function(clone) {
angular.element($element[0].querySelector('div')).append(clone);
});
2018-03-01 22:38:14 +00:00
}
2018-02-10 15:18:01 +00:00
};
}
ngModule.directive('vnCard', directive);