Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(module:drawer): drawer not open #8120

Merged
merged 1 commit into from Oct 23, 2023

Conversation

Nicoss54
Copy link
Collaborator

Drawer don't open in a lazyload module

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

This pr is a fix.

[X] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Application (the showcase website) / infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

The drawer does not open if the NzDrawerModule is imported into a lazyloader module and one of the components of the lazyloader module injects a service also declared in the lazyloader module.

The fact that the NzDrawerService service was injected into the Root injector prevented the resolution of the Lazyloader service, simply because the parentInjector was not the right one.

Issue Number: #8100

What is the new behavior?

User can now use the NzDrawerService in a lazyload module

Does this PR introduce a breaking change?

[ ] Yes
[X] No

Other information

@Nicoss54 Nicoss54 self-assigned this Oct 14, 2023
@zorro-bot
Copy link

zorro-bot bot commented Oct 14, 2023

This preview will be available after the AzureCI is passed.

@codecov
Copy link

codecov bot commented Oct 14, 2023

Codecov Report

Merging #8120 (828e02c) into master (a4b299e) will decrease coverage by 0.02%.
The diff coverage is n/a.

❗ Current head 828e02c differs from pull request most recent head 5c1cda1. Consider uploading reports for the commit 5c1cda1 to get more accurate results

@@            Coverage Diff             @@
##           master    #8120      +/-   ##
==========================================
- Coverage   91.67%   91.66%   -0.02%     
==========================================
  Files         518      517       -1     
  Lines       17786    17785       -1     
  Branches     2719     2719              
==========================================
- Hits        16306    16303       -3     
- Misses       1179     1180       +1     
- Partials      301      302       +1     
Files Coverage Δ
components/drawer/drawer.module.ts 100.00% <ø> (ø)
components/drawer/drawer.service.ts 100.00% <ø> (ø)

... and 1 file with indirect coverage changes

Copy link
Member

@hsuanxyz hsuanxyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


@NgModule({
providers: [NzDrawerService]
})
export class NzDrawerServiceModule {}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to provide services directly on NzDrawerModule instead of NzDrawerServiceModule?
For NzDrawerServiceModule we can delete it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah of course i will do it then merge it ;)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah of course i will do it then merge it ;)

@HyperLife1119 seems good now :)

Drawer don't open in a lazyload module

refactor(module:drawer): remove useless DrawerServiceModule
@Nicoss54
Copy link
Collaborator Author

@OriginRing do you think it's possible to add also this in the next release ? I think this issue is also a block issue no ?

@OriginRing OriginRing merged commit 24d0664 into NG-ZORRO:master Oct 23, 2023
7 checks passed
@Libohan12
Copy link

When are the Releases published?
I have the same question as well.

@Nicoss54 Nicoss54 deleted the fix/8100-drawerService branch December 2, 2023 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NzDrawerService not working anymore with components whose inject not root services
5 participants