FAQ

Please check the FAQ below before asking questions.

Basic

Can't Bind to since it isn't a known property of

When you have multiple lazy modules, you want each submodule to use the component library (for example: NgZorroAntdModule, NgxTinymceModule) should be exported in ShareModule, please refer to module registration guidelines.

Expression Changed After It Has Been Checked Error

Common mistakes under Angular, this article will help you understand why.

Can't bind to 'formGroup' since it isn't a known property of 'form'

Common mistakes under Angular, the use of Reactive Forms requires the introduction of ReactiveFormsModule, refer to official documentation.

Why is the page not updated after the data is modified?

The NG-ZORRO and @delon/* components work in OnPush mode by default. Mutate objects or arrays do not trigger Angular's change detection. Use the immutable method.

How to use @delon daily build version

NG-ALAIN provides a delon-builds repository as a daily build version. It's not the final stable version, but contains the latest fixed BUG, To use the latest features, you can create delon.sh in the root directory:

#!/usr/bin/env bash
set -e
echo "Download latest @delon version"
rm -rf delon-builds
git clone --depth 1 https://github.com/ng-alain/delon-builds.git
rm -rf node_modules/@delon
rm -rf node_modules/ng-alain
rsync -am delon-builds/ node_modules/
NG_ALAIN_VERSION=$(node -p "require('./node_modules/ng-alain/package.json').version")
rm -rf delon-builds
echo "Using ng-alain version: ${NG_ALAIN_VERSION}"

When you need to use the daily build version of @delon, you only need to run:

bash delon.sh

If in Windows environment, please use WSL to execute Bash scripts.

Installation

Why can't I find the ng-zorro-antd/src/*.less style?

Two situations:

  • Using cnpm to install dependencies, you will not be able to find style files. This is because cnpm is in the form of a soft link path, which causes the ng-zorro-antd folder name to change, so it is recommended to use the yarn install dependency package instead.

  • The ng-zorro-antd version is too old to cause some components to fail to load into the appropriate style

How to use Taobao source correctly?

The simplest is to use the networkEnv plugin.

Or manually repair:

yarn config set registry https://registry.npmmirror.com
yarn config set sass_binary_site https://npmmirror.com/mirrors/node-sass
# restore
yarn config delete registry
yarn config delete sass_binary_site

Configuration

How do I deploy the antd icon locally?

First, the latest iconfont file can go to this link (mirror) Download.

Finally, redefine the new path in src/styles/theme.less:

@icon-url: "/assets/iconfont";

Use an absolute path or CDN address.

Missing locale data for the locale "zh-cn"

For missing language imports, refer to app.module.ts.

How to deploy ng-alain.com documentation site in local

We provided an online snapshot:

git clone --depth 1 --branch gh-pages https://github.com/ng-alain/delon.git docs

You can simply create a Docker container to quickly deploy the same documentation site as ng-alain