Blame view

build/Alert/Alert.js 598 Bytes
3a3ecabe   Imshann   init
1
2
  import template from "./Alert.html";
  import style from "antd/lib/alert/style/index.css";
81f8a467   Imshann   调整组件前缀
3
  angular.module("esNgAntd").directive("antdAlert", function (esNgAntd) {
3a3ecabe   Imshann   init
4
      return {
81f8a467   Imshann   调整组件前缀
5
          controllerAs: "antdAlert",
3a3ecabe   Imshann   init
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
          restrict: "E",
          transclude: true,
          replace: true,
          scope: {
              type: "@",
              message: "@",
              showIcon: "@",
              description: "@",
          },
          template: template,
          link: function ($scope, $element, $attrs, $controllers, $transclude) {
              esNgAntd.createStyle("ant-alert", style);
          },
      };
  });