ng-zorro-antd support schematics, you can init configuration and generate component with schematics now.

Init Project#

Init project with ng-zorro-antd.

Run ng add ng-zorro-antd in your project directory, and follow the options to configure.

You can choose a preset template to create your project, then develop on this basis code.


ng add ng-zorro-antd [options]



ng-zorro-antd will create theme.less in src folder.

You can get more information at the Customize Theme part.


If you add --locale=[language]ng-zorro-antd import the language package and the i18n part of angular in the app.module.ts.

The default i18n config of ng-zorro-antd is zh_CN now,you can get more information at the Internationalization part.


Enable the BrowserAnimationsModule your app module


Install and import hammerjs for gesture support in your project

Component Generation#

You can get component generation code in our doc after expand the code panel below every example.


ng g ng-zorro-antd:[schematic] <name> [options]

For example, you can generate an login form with the follow command.

ng g ng-zorro-antd:form-normal-login login