-
Notifications
You must be signed in to change notification settings - Fork 4k
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:core): fix global config not working in prod mode #4325
Conversation
Deploy preview for ng-zorro-master ready! Built with commit 60f7b1b |
Codecov Report
@@ Coverage Diff @@
## master #4325 +/- ##
==========================================
+ Coverage 92.15% 92.19% +0.04%
==========================================
Files 520 520
Lines 11016 11038 +22
Branches 1997 1997
==========================================
+ Hits 10152 10177 +25
+ Misses 431 429 -2
+ Partials 433 432 -1
Continue to review full report at Codecov.
|
this.nzConfigService | ||
.getConfigChangeEventForComponent(trimComponentName(this.constructor.name)) | ||
.subscribe(() => this.setConfig()); | ||
this.nzConfigService.getConfigChangeEventForComponent('message').subscribe(() => this.setConfig()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would better to add an NZ_CONFIG_COMPONENT_NAME
like other components here
@@ -64,7 +64,7 @@ export class NzNotificationContainerComponent extends NzMessageContainerComponen | |||
const newConfig = (this.config = { | |||
...this.config, | |||
...config, | |||
...this.nzConfigService.getConfigForComponent(trimComponentName(this.constructor.name)) | |||
...this.nzConfigService.getConfigForComponent('notification') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would better to add an NZ_CONFIG_COMPONENT_NAME
like other components here
components/spin/nz-spin.component.ts
Outdated
@@ -82,7 +77,7 @@ export class NzSpinComponent implements OnChanges, OnDestroy, OnInit { | |||
this.subscribeLoading(); | |||
|
|||
this.nzConfigService | |||
.getConfigChangeEventForComponent(trimComponentName(this.constructor.name)) | |||
.getConfigChangeEventForComponent('spin') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NZ_CONFIG_COMPONENT_NAME
@@ -60,7 +60,7 @@ export class NzSwitchComponent implements ControlValueAccessor, AfterViewInit, O | |||
@Input() @InputBoolean() nzControl = false; | |||
@Input() nzCheckedChildren: string | TemplateRef<void>; | |||
@Input() nzUnCheckedChildren: string | TemplateRef<void>; | |||
@Input() @WithConfig('default') nzSize: NzSizeDSType; | |||
@Input() @WithConfig('switch', 'default') nzSize: NzSizeDSType; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would better to add an NZ_CONFIG_COMPONENT_NAME like other components here
@@ -80,7 +80,7 @@ export class NzTypographyComponent implements OnInit, AfterViewInit, OnDestroy, | |||
@Input() @InputBoolean() nzExpandable = false; | |||
@Input() @InputBoolean() nzEllipsis = false; | |||
@Input() nzContent: string; | |||
@Input() @WithConfig(1) @InputNumber() nzEllipsisRows: number; | |||
@Input() @WithConfig('typography', 1) @InputNumber() nzEllipsisRows: number; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would better to add an NZ_CONFIG_COMPONENT_NAME like other components here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left some comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…O#4325) * fix(module:core): fix global config not working in prod mode * chore: cleanup code close NG-ZORRO#4319
…O#4325) * fix(module:core): fix global config not working in prod mode * chore: cleanup code close NG-ZORRO#4319
close #4319
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: #4319
What is the new behavior?
Global configuration works in prod env.
Does this PR introduce a breaking change?
Other information