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

Dialog injection tokens #3903

Closed
salarenko opened this issue Nov 20, 2020 · 0 comments · Fixed by #4108
Closed

Dialog injection tokens #3903

salarenko opened this issue Nov 20, 2020 · 0 comments · Fixed by #4108
Assignees
Labels
core Core library specific issues enhancement New feature or request

Comments

@salarenko
Copy link
Contributor

salarenko commented Nov 20, 2020

Is this a bug, enhancement, or feature request?

enhancement

Briefly describe your proposal.

Currently Dialog is using DIALOG_CONFIG and DIALOG_REF injections token for providing config and ref dependencies. Having additional tokens makes it harder for the user to implement the Dialog (user needs to know and remember about the tokens).
The proposition is to remove DIALOG_CONFIG and DIALOG_REF and make DialogConfig and DialogRef injectable. This will result in user having to write this:

constructor(
    public dialogConfig: DialogConfig,
    public dialogRef: DialogRef
) { }

instead of:

constructor(
    @Inject(DIALOG_CONFIG) public dialogConfig: DialogConfig,
    @Inject(DIALOG_REF) public dialogRef: DialogRef
) { }

2h - document; keep both approaches for now and deprecate the current

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core library specific issues enhancement New feature or request
Projects
None yet
3 participants