Skip to content

Commit

Permalink
docs: fix version
Browse files Browse the repository at this point in the history
  • Loading branch information
Wendell committed Sep 9, 2019
1 parent 6f8b3f5 commit 08d31ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/global-config.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ order: 7
title: Global Configuration
---

From version 8.2.0, we add support of **global configuration** to many components. You can define the default behavior of the component through global configuration, thus reducing the code that needs to be written in the template, and implement feature that is similar to switching themes.
From version 8.3.0, we add support of **global configuration** to many components. You can define the default behavior of the component through global configuration, thus reducing the code that needs to be written in the template, and implement feature that is similar to switching themes.

<blockquote style="border-color: red;"><p><strong>The injection tokens provided by components previously will be removed in the 9.x versions. Please migrate to the new API <code>NZ_CONFIG</code>.</strong></p></blockquote>

Expand Down Expand Up @@ -35,7 +35,7 @@ export class AppModule {}

These global configuration would be injected into a service named `NzConfigService` and gets stored.

## Dynamic
## Dynamically Chaing Configs

You can change the global config of a specific component by calling the `set` method of `NzConfigService`. For example, if you want to make all buttons to be barge in size by default, you should:

Expand Down
6 changes: 3 additions & 3 deletions docs/global-config.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ order: 7
title: 全局配置项
---

从 8.2.0 版本开始,我们给众多组件添加了**全局配置**功能,你可以通过全局配置来定义组件的默认行为,从而减少在模板中需要写的代码(让你的代码更加清爽),还能实现类似于切换主题的功能。
从 8.3.0 版本开始,我们给众多组件添加了**全局配置**功能,你可以通过全局配置来定义组件的默认行为,从而减少在模板中需要写的代码(让你的代码更加清爽),还能实现类似于切换主题的功能。

<blockquote style="border-color: red;"><p><strong>之前各组件单独提供的注入令牌将会在 ng-zorro-antd 9.x 版本中移除,请及时迁移!</strong></p></blockquote>

Expand Down Expand Up @@ -50,13 +50,13 @@ export class ChangeZorroConfigComponent {
constructor(private nzConfigService: NzConfigService) {}

onChangeConfig() {
// 爷爷:这个好
// 爷爷:我就喜欢大号字
this.nzConfigService.set('button', { nzSize: 'large' })
}
}
```

所改变的组件实例都会响应这些改变
所有的组件实例都会响应这些改变(只要它们没有被单独赋值)

## 全局配置项的优先级

Expand Down

0 comments on commit 08d31ae

Please sign in to comment.