Skip to content

docs: fix the compile errors in the migration examples - #71382

Open
erkamyaman wants to merge 1 commit into
angular:mainfrom
erkamyaman:docs-migration-examples-compile
Open

erkamyaman wants to merge 1 commit into
angular:mainfrom
erkamyaman:docs-migration-examples-compile

Conversation

@erkamyaman

Copy link
Copy Markdown
Contributor

Several before and after examples on the migration pages don't compile when you copy them.

  • Signal queries: ElementRef is used but not imported, and the template reads someRef (the query selector) instead of the member ref.
  • Standalone: the "After" main.ts imports App from ./app, but the component file is ./app/app.
  • RouterTestingModule: TestBed is used in all four examples but never imported.
  • Inject: @Component() has no argument, but the decorator requires one. It's now @Component({template: ''}).

Several before and after examples on the migration pages do not compile
when copied.

The signal queries example uses `ElementRef` without importing it, and its
template reads `someRef`, which is the query selector, not the `ref`
member. The standalone bootstrap example imports `App` from `./app`, but
`main.ts` sits next to the `app` folder, so the path is `./app/app`. The
RouterTestingModule examples use `TestBed` without importing it. The inject
examples use `@Component()` with no argument, which the decorator does not
accept.
@pullapprove
pullapprove Bot requested a review from MarkTechson October 15, 2026 15:48
@angular-robot angular-robot Bot added the area: docs Related to the documentation label Oct 15, 2026
@ngbot ngbot Bot added this to the Backlog milestone Oct 15, 2026
@JeanMeche
JeanMeche removed the request for review from MarkTechson October 15, 2026 16:00
@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 Oct 15, 2026
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: 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.

2 participants