[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[ ] Feature request
[x] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:
Current behavior
For type inference to work on the DialogService.open, DialogComponent.afterClosed$ and DialogComponent.close components, it is essential that the to-be-opened dialog component has a public property with a DialogRef<Input, Output> type.
This is not made clear (enough) in the current documentation.
Many code-bases have rules that state that modifiers should be as strict as possible.
If the DialogRef property is made private or protected the typing would fallback to any, missing the possible benefits of types.
Expected behavior
Documentation is clear of the fact that the ref property needs to be public.
Ideally this is added as a note in the readme.
Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
Documentation should be clear on how to use this library and use all of its features, including proper typing.
Environment
Angular version: X.Y.Z
Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
For Tooling issues:
- Node version: XX
- Platform:
Others:
Just let me know if you are willing to accept a PR adding this note.
I'm submitting a...
Current behavior
For type inference to work on the
DialogService.open
,DialogComponent.afterClosed$
andDialogComponent.close
components, it is essential that the to-be-opened dialog component has a public property with aDialogRef<Input, Output>
type. This is not made clear (enough) in the current documentation.Many code-bases have rules that state that modifiers should be as strict as possible. If the
DialogRef
property is madeprivate
orprotected
the typing would fallback toany
, missing the possible benefits of types.Expected behavior
Documentation is clear of the fact that the
ref
property needs to be public.Ideally this is added as a note in the readme.
Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
Documentation should be clear on how to use this library and use all of its features, including proper typing.
Environment
Just let me know if you are willing to accept a PR adding this note.