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
|
|
|
|
|
|
|
directive.$inject = ['vnTemplate'];
|
|
|
|
export default function directive(vnTemplate) {
|
|
|
|
return {
|
|
|
|
restrict: 'E',
|
|
|
|
transclude: true,
|
2018-03-01 22:38:14 +00:00
|
|
|
template: require('./card.html'),
|
2018-05-30 06:44:01 +00:00
|
|
|
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');
|
2018-05-30 06:44:01 +00:00
|
|
|
|
|
|
|
$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);
|