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

icon user exp improve #4886

Closed
2 tasks
vthinkxie opened this issue Mar 15, 2020 · 3 comments
Closed
2 tasks

icon user exp improve #4886

vthinkxie opened this issue Mar 15, 2020 · 3 comments
Assignees

Comments

@vthinkxie
Copy link
Member

  • use forChild to register icons to ng-zorro-antd submodules
  • change NZ_CONFIG to the params of the forRoot(icons, config)
@wzhudev
Copy link
Member

wzhudev commented Mar 17, 2020

I don't think it's a good idea to make properties of NZ_CONFIG.icon to be a parameter of NzIconModule.forRoot. Anyway, if users want to change the config at runtime, they still need to call NzConfigService or NzIconService. I am afraid we are introducing unnecessary complexity.

@vthinkxie
Copy link
Member Author

vthinkxie commented Mar 20, 2020

forRoot is just a syntactic sugar IMO, since we have already provided the forChild function, it makes sense for the users to use the forRoot
https://angular.io/guide/singleton-services#the-forroot-pattern
if the user need to change the config, they still can use the NzConfigService or NzIconService.
but I believe most users won't need to change it at the runtime.
ref
https://github.com/vthinkxie/di-factory-lazy-loading/blob/master/src/app/icon/icon.module.ts#L26

@wzhudev
Copy link
Member

wzhudev commented Jul 10, 2020

Already implemented in #4711. I am closing this.

@wzhudev wzhudev closed this as completed Jul 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants