docs: change wording in ComponentDecorator to incorporate components without NgModule#57709
docs: change wording in ComponentDecorator to incorporate components without NgModule#57709ChinoUkaegbu wants to merge 5 commits intoangular:mainfrom
Conversation
| * A component must belong to an NgModule in order for it to be available | ||
| * to another component or application. To make it a member of an NgModule, | ||
| * list it in the `declarations` field of the `NgModule` metadata. | ||
| * When running Angular with NgModule, a component must belong to an NgModule in |
There was a problem hiding this comment.
I'm wondering if we shouldn't drop that section altogether as we're moving toward standalone by default.
There was a problem hiding this comment.
If using NgModule is still going to be an option for users, then it's worth keeping imo! Or perhaps changing 'When running' to 'If running' so it seems more optional?
There was a problem hiding this comment.
The jsdoc only mentionning NgModules and not standalone components is an issue to me. The docs should clearly indicate the recommendation toward standalone.
There was a problem hiding this comment.
Would adding "However, Angular now recommends using standalone components, which do not require an NgModule and can be directly imported and used in other components or applications." or something to that effect resolve this or is that too wordy and would it be better to just remove that section entirely?
There was a problem hiding this comment.
Made the change!
There was a problem hiding this comment.
Wdyt of mentionning standalone first, then the case of NgModules, as those are more secondary ?
There was a problem hiding this comment.
Starting with the recommended method makes sense to me, I've edited it
…adata/directives.ts Co-authored-by: Matthieu Riegler <kyro38@gmail.com>
|
Could you please squash all the commit into one, we'd like this change to be a single commit. Thank you. |
|
I created a new PR #57878 with the changes in a single commit as well as followed the guidelines for the commit message. |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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?
The documentation insists that a component must belong to an NgModule in order for it to be available to another component or application.
Issue Number: #57689
What is the new behavior?
The documentation still provides instructions to make a component a member of an NgModule, but only when running Angular with NgModule
Does this PR introduce a breaking change?
Other information