Skip to content

docs: update to new standalone default behavior #63329

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AlexanderMelde
Copy link
Contributor

When declaring directives, the standalone flag is set to true by default in current Angular versions.

The docs for the directive decorator should correctly explain the default behavior, while still mentioning when to set it to false.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.dev application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

The current docs describe how to set the standalone flag of a directive to true to make the directive available to other components. The wording implies that it needs to be set explicitly, even though it is the default behavior in current versions of Angular.

What is the new behavior?

The documentation reflects the current behavior of the standalone flag and explains what needs to be done to declare a directive in a module instead.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

When declaring directives, the standalone flag is set to true by default in current Angular versions.

The docs for the directive decorator should correctly explain the default behavior, while still mentioning when to set it to false.
@pullapprove pullapprove bot requested a review from crisbeto August 22, 2025 08:40
@angular-robot angular-robot bot added the area: docs Related to the documentation label Aug 22, 2025
@ngbot ngbot bot added this to the Backlog milestone Aug 22, 2025
Copy link
Member

@JeanMeche JeanMeche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: docs Related to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants