Skip to content

Docs for @Component decorator: Missing consideration of standalone components #57689

@a2mar

Description

@a2mar

Describe the problem that you experienced

In the documentation for the Component decorator, i stumpled accross the sentence:

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.

Isn't it possible to create and run an Angular application entirely without the creation of NgModule, i.e. with bootstrapApplication?

I suggest to omit that sentence or to adjust it as follows:

When running Angular with NgModule, 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.

Enter the URL of the topic with the problem

export interface ComponentDecorator {

Describe what you were looking for in the documentation

consideration of the possiblity to run Angular without declaring components in NgModule

Describe the actions that led you to experience the problem

No response

Describe what you want to experience that would fix the problem

No response

Add a screenshot if that helps illustrate the problem

No response

If this problem caused an exception or error, please paste it here

No response

If the problem is browser-specific, please specify the device, OS, browser, and version

No response

Provide any additional information here in as much as detail as you can

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: docsRelated to the documentationgood first issueLabel noting a good first issue to be worked on by a community memberopen for contributionsAn issue that is suitable for a community contributor (based on its complexity/scope).state: has PR

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions