ng-zorro-antd 8.0.0 released

June 29, 2019
Category
Other

Tags
Announcement

Intro

Welcome to ng-zorro-antd 8.0.0. After upgrading to the latest version, developers can not only enjoy the latest version of Angular, but also get the latest features and better performance.

You need to update your Angular to ^8.0.0 before update. Some ng-zorro-antd APIs are deprecated in version 8.0.0, and all deprecated APIs will still be supported until 9.0.0, which means that version 8.0.0 is fully compatible with version 7.0.0. Developers can get detailed tips on deprecated APIs in the development environment (prompts will not appear in production environments) and have plenty of time to fix these usages before 9.0.0 is released.

  • New Typography Component, which provides basic formatting and common operations for text.

  • Support admin template when run ng add ng-zorro-antd, more info can be found in Schematics part.

  • The Form Component has been fully enhanced, developers only needs to pass in the error tips.
<nz-form-control nzErrorTip="Please input your username!">
  <nz-input-group [nzPrefix]="prefixUser">
    <input formControlName="userName" nz-input placeholder="Username" />
  </nz-input-group>
</nz-form-control>
  • There is no need to wrap the dropdown directive with nz-dropdown now.
<a nz-dropdown [nzDropdownMenu]="menu">Hover me</a>
<nz-dropdown-menu #menu="nzDropdownMenu">
  <ul nz-menu>
    <li nz-menu-item>1st menu item</li>
    <li nz-menu-item>2nd menu item</li>
    <li nz-menu-item>3rd menu item</li>
  </ul>
</nz-dropdown-menu>
  • Menu support automatic highlighting based on routing.
<ul nz-menu nzMode="horizontal">
  <li nz-menu-item nzMatchRouter>
    <a [routerLink]="['/', 'welcome']">Welcome</a>
  </li>
</ul>

Angular Update Guide

It is recommended to upgrade according to the Angular Update Guide prompt. The following questions may require additional attention:

Features

  • avatar: add nzSrcSet & nzAlt properites (#3583) (d0ad5e8), closes #3543
  • breadcrumb: support dropdown (#3636) (9dfab45)
  • carousel: support dot position (#3575) (0566331)
  • core: add universal logger funcs and deprecation warnings (#3538) (b893520)
  • form: refactor form to support better template driven (10d0e28)
  • input-number: support nzId (a6500c8)
  • menu: support auto active menu-item via routerLink (c9e84c7)
  • menu: support nzTitle & nzIcon in nz-submenu (0cde4d7)
  • pagination: support pagination nzDisabled (141bef8)
  • select: support custom template in select component (#3071) (aad02a5), closes #2946
  • table: support nzVirtualForTrackBy (cb14096)
  • transfer: add nzShowSelectAll & nzRenderList properties (#3588) (1619f30), closes #3567 #2870
  • typography: add typography component (#3119) (4d739ef)
  • schematics: add template option in ng-add (#3674) (69072de)

Bug Fixes

  • button: fix order of DOM nodes in button (#3578) (c3df8b5), closes #3079
  • card: fix card tab ng-template (#3654) (7585ba4)
  • descriptions: fix warning without logger (#3663) (5826fc1)
  • dropdown: dropdown should close when set disabled (0bd1ae3), closes #3420
  • dropdown: fix dropdown change after checked bug (16d5c2d)
  • dropdown: fix dropdown SSR bug (#3628) (ade1abd)
  • form: fix form control validate with formControl (bc54e90), closes #3551
  • form: fix form overlap (#3633) (0fc7d05), closes #3607
  • form: fix nzValidateStatus & nzHasFeedback overlap (fb4965b), closes #3607
  • grid: Make all properties in EmbeddedProperty optional (#3473) (107e731)
  • input: fix ng-content nzAddOnBeforeIcon transclusion (#3597) (a37ec0a), closes #3596
  • mention: fix cannot to switch trigger (#3632) (c8b5b09), closes #3629
  • menu: fix menu title ExpressionChangedAfterItHasBeenCheckedError (52975ff), closes #3023
  • menu: fix submenu not active when collapsed (67f6fa2), closes #3345
  • pagination: fix pagination nzTotal 0 bug (#3651) (d28fc49), closes #3648
  • select: fix nzOpen state when nzOnSearch trigger (3ca816d), closes #3626
  • select: fix select enter open when disabled (36db36c), closes #3408
  • select: fix the bug of duplication when keyboard input chinese char (#3440) (3c82f26), closes #3439
  • table: compatible with @angular/material/table (79b02ca)
  • table: fix sortChange with dynamic columns (#3603) (#3605) (c85743d)
  • typography: fix the actions button order (#3677) (c2c28a4)
  • typography: not render when the edit text has no changes (51b9ce0)

NG-ZORRO and Friends

Written by NG-ZORRO and Friends.
Follow us on Twitter