全局页脚
IMPORT MODULE

页脚属于全局导航的一部分,作为对顶部导航的补充,通过传递数据控制展示内容。

代码演示

演示

基本页脚。

expand codeexpand code
import { Component } from '@angular/core';
import { GlobalFooterLink } from '@delon/abc/global-footer';

@Component({
  selector: 'components-global-footer-basic',
  template: `
    <div style="height: 280px;"></div>
    <global-footer [links]="links">
      Copyright<i nz-icon nzType="copyright" class="mx-sm"></i>2019<a href="//github.com/cipchk" target="_blank" class="mx-sm">卡色</a>出品
    </global-footer>
  `,
  styles: [
    `
      :host {
        display: block;
      }
    `,
  ],
})
export class ComponentsGlobalFooterBasicComponent {
  links: GlobalFooterLink[] = [
    {
      title: '帮助',
      href: 'https://ng-alain.com/',
      blankTarget: true,
    },
    {
      title: 'Github',
      href: 'https://github.com/ng-alain',
      blankTarget: true,
    },
    {
      title: '预览',
      href: 'https://ng-alain.surge.sh/',
      blankTarget: true,
    },
  ];
}
自定义

使用 global-footer-item 自定义图标。

expand codeexpand code
import { Component } from '@angular/core';

@Component({
  selector: 'components-global-footer-custom',
  template: `
    <div style="height: 280px;"></div>
    <global-footer>
      <global-footer-item href="https://ng-alain.com/" blankTarget>帮助</global-footer-item>
      <global-footer-item href="https://github.com/ng-alain" blankTarget>
        <i nz-icon nzType="github"></i>
      </global-footer-item>
      <global-footer-item href="https://ng-alain.surge.sh/" blankTarget>预览</global-footer-item>
      Copyright<i nz-icon nzType="copyright" class="mx-sm"></i>2019<a href="//github.com/cipchk" target="_blank" class="mx-sm">卡色</a>出品
    </global-footer>
  `,
  styles: [
    `
      :host {
        display: block;
      }
    `,
  ],
})
export class ComponentsGlobalFooterCustomComponent {}

API

参数说明类型默认值
[links]链接数据GlobalFooterLink-
[copyright]版权信息TemplateRef-
参数说明类型默认值
ng-content标题string-
[href]路由链接string-
[blankTarget]是否打开新窗口booleanfalse
参数说明类型默认值
[title]标题string-
[href]路由链接string-
[blankTarget]是否打开新窗口booleanfalse