global-footer 全局页脚

global-footer 全局页脚

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

import { GlobalFooterModule } from '@delon/abc/global-footer';

代码演示

演示

基本页脚。

import { Component } from '@angular/core';@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 = [    {      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 自定义图标。

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] 是否打开新窗口 boolean false
参数 说明 类型 默认值
[title] 标题 string -
[href] 路由链接 string -
[blankTarget] 是否打开新窗口 boolean false