Empty.js
905 Bytes
import template from "./Empty.html";
import style from "antd/lib/empty/style/index.css";
angular.module("esNgAntd").directive("esEmpty", function (esNgAntd) {
return {
controllerAs: "esEmpty",
restrict: "E",
transclude: true,
replace: true,
scope: {
image: "@",
},
template: template,
controller: function ($scope, $element) {
this.getContext = function () {
return $scope;
};
$scope.state = {
image: $scope.image || "presented_image_default",
};
},
link: function ($scope, $element, $attrs, $controllers, $transclude) {
esNgAntd.createStyle("ant-empty", style);
},
};
});
export default {
PRESENTED_IMAGE_DEFAULT: "presented_image_default",
PRESENTED_IMAGE_SIMPLE: "presented_image_simple",
};