NG-ZORRO / ng-zorro-antd

Angular UI Component Library based on Ant Design
https://ng.ant.design
MIT License
8.86k stars 3.91k forks source link

docs(module:message,notification): update import usages #8802

Open HyperLife1119 opened 1 day ago

HyperLife1119 commented 1 day ago

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

What is the current behavior?

Issue Number: N/A

What is the new behavior?

更新了这两个组件的导入用法。

由于 NzMessageService 与 NzNotificationService 都是在 root 中提供的(providedIn: 'root'),并且这两个组件都是 standalone 的,因此不再需要导入对应的 NgModule 即可使用。

弃用这两个组件对应的 NgModule,无论是在 standalone 还是非 standalone 的应用中,这两个 NgModule 都是不必要的。

Does this PR introduce a breaking change?

Other information

zorro-bot[bot] commented 1 day ago

This preview will be available after the AzureCI is passed.

codecov[bot] commented 1 day ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 91.78%. Comparing base (bbac457) to head (a819132). Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #8802 +/- ## ========================================== + Coverage 91.76% 91.78% +0.01% ========================================== Files 536 536 Lines 18455 18455 Branches 2816 2816 ========================================== + Hits 16935 16938 +3 + Misses 1210 1208 -2 + Partials 310 309 -1 ``` | [Flag](https://app.codecov.io/gh/NG-ZORRO/ng-zorro-antd/pull/8802/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NG-ZORRO) | Coverage Δ | | |---|---|---| | [](https://app.codecov.io/gh/NG-ZORRO/ng-zorro-antd/pull/8802/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NG-ZORRO) | `91.78% <ø> (+0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NG-ZORRO#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.