Card.js
607 Bytes
import style from "antd/lib/card/style/index.css";
import template from "./Card.html";
angular.module("esNgAntd").directive("antdCard", ["esNgAntd", function (esNgAntd) {
return {
template: template,
restrict: "E",
replace: true,
transclude: true,
scope: {
title: "@",
extra: "@",
bordered: "="
},
link: function ($scope, $element) {
$element[0].removeAttribute("title");
$element[0].removeAttribute("extra");
$element[0].removeAttribute("ng-class");
$scope.self = $scope;
esNgAntd.createStyle("ant-card", style);
}
};
}]);