Skip to content

Conversation

@pawelfras
Copy link
Contributor

@pawelfras pawelfras commented Nov 18, 2025

PR Checklist

Please check to confirm 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
  • Other... Please describe:

What is the current behavior?

Follow-up PR to #31831

When scaffolding new app with standalone components using --file-name-style-guide=2016, the main.ts file refers to non-existing .app/app file.

Steps to reproduce:

npx @angular/cli@21.0.0-rc.5 new nmy-app --file-name-style-guide=2016

Issue Number: N/A

What is the new behavior?

main.ts.template file used for scaffolding app with standalone component has been adjusted to use suffix variable.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Copy link
Collaborator

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

@alan-agius4 alan-agius4 added target: patch This PR is targeted for the next patch release action: merge The PR is ready for merge by the caretaker labels Nov 18, 2025
@pawelfras
Copy link
Contributor Author

Hi @alan-agius4,
this PR should also fix app generated with SSR, where name of the root component and its path passed to server-related files are found based on what bootstrapApplication function from main.ts is called with:

const { componentName, componentImportPathInSameFile, moduleName, moduleImportPathInSameFile } =
)
export function resolveBootstrappedComponentData(

Because the main.ts was referring to wrong path, the same non-existing path was used when generating main.server.ts file.

@alan-agius4 alan-agius4 added target: rc This PR is targeted for the next release-candidate and removed target: patch This PR is targeted for the next patch release labels Nov 18, 2025
@dgp1130 dgp1130 merged commit a8bd8f7 into angular:main Nov 18, 2025
35 checks passed
@dgp1130
Copy link
Collaborator

dgp1130 commented Nov 18, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: @schematics/angular target: rc This PR is targeted for the next release-candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants