Skip to content

docs: update to new standalone default behavior#63329

Closed
AlexanderMelde wants to merge 1 commit intoangular:mainfrom
AlexanderMelde:patch-2
Closed

docs: update to new standalone default behavior#63329
AlexanderMelde wants to merge 1 commit intoangular:mainfrom
AlexanderMelde:patch-2

Conversation

@AlexanderMelde
Copy link
Copy Markdown
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
Copy Markdown
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 !

@JeanMeche JeanMeche removed the request for review from crisbeto August 26, 2025 22:45
@JeanMeche JeanMeche added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Aug 26, 2025
@AndrewKushnir
Copy link
Copy Markdown
Contributor

This PR was merged into the repository. The changes were merged into the following branches:

AndrewKushnir pushed a commit that referenced this pull request Aug 27, 2025
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 Close #63329
@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: docs Related to the documentation target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants