GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(@schematics/angular): set explicit type for the app-shell component by MeAkib · Pull Request #34450 · angular/angular-cli

Conversation

@MeAkib

@MeAkib MeAkib commented Oct 20, 2026 •
edited by alan-agius4
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

ng generate app-shell adds an AppShell import from ./app-shell/app-shell, but the component it generates inherits the workspace type option. In workspaces that set "@schematics/angular:component": { "type": "component" }, such as those updated to v20, the component was generated as app-shell.component.ts and the import failed to resolve.

Pass an empty type, as the library schematic does (661609e).

Closes #34449

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gemini-code-assist[bot] reacted with eyes emoji
All reactions
  • 👀 1 reaction
@angular-robot angular-robot Bot added the area: @schematics/angular label Oct 20, 2026
gemini-code-assist[bot]
gemini-code-assist Bot reviewed Oct 20, 2026
View reviewed changes

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Code Review

This pull request updates the Angular app-shell schematic to explicitly set the component type option to an empty string (type: ''). This prevents the generated app-shell component from inheriting a custom component type from the workspace defaults, which would otherwise alter the file and class names and break the expected AppShell import. Additionally, a unit test has been added to verify this behavior by emulating workspace defaults. There are no review comments to address, and the changes look solid.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@MeAkib
MeAkib force-pushed the fix/app-shell-component-type branch from 7ece3b8 to c7f3fce Compare October 20, 2026 18:13
alan-agius4
alan-agius4 requested changes Oct 21, 2026
View reviewed changes

@alan-agius4 alan-agius4 left a comment

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks for the contribution! Left a comment regarding the test in packages/schematics/angular/app-shell/index_spec.ts.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

MeAkib reacted with heart emoji
All reactions
  • ❤️ 1 reaction
Comment thread packages/schematics/angular/app-shell/index_spec.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@alan-agius4 alan-agius4 added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews target: patch This PR is targeted for the next patch release labels Oct 21, 2026
@MeAkib
MeAkib requested a review from alan-agius4 October 22, 2026 02:06
@alan-agius4 alan-agius4 added action: review The PR is still awaiting reviews from at least one requested reviewer and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Oct 22, 2026
thekhegay
thekhegay reviewed Oct 24, 2026
View reviewed changes
Comment thread packages/schematics/angular/app-shell/index.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@MeAkib
MeAkib force-pushed the fix/app-shell-component-type branch from d35e8c2 to 9ca3acf Compare October 24, 2026 11:25
alan-agius4
alan-agius4 approved these changes Oct 27, 2026
View reviewed changes
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Oct 27, 2026
MeAkib added 2 commits October 27, 2026 08:00
@MeAkib @alan-agius4
fix(@schematics/angular): set explicit type for the app-shell component
aabcefe
`ng generate app-shell` adds an `AppShell` import from `./app-shell/app-shell`, but the component it
generates inherits the workspace `type` option. In workspaces that set
`"@schematics/angular:component": { "type": "component" }`, such as those updated to v20, the
component was generated as `app-shell.component.ts` and the import failed to resolve.

Pass an empty `type`, as the library schematic does (661609e).

Refs angular#34449
@MeAkib @alan-agius4
fixup! fix(@schematics/angular): set explicit type for the app-shell …
10ccb08
…component
@alan-agius4
alan-agius4 force-pushed the fix/app-shell-component-type branch from 9ca3acf to ffdecff Compare October 27, 2026 08:00
@alan-agius4 alan-agius4 added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed action: merge The PR is ready for merge by the caretaker labels Oct 27, 2026
@alan-agius4

alan-agius4 commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

@MeAkib looks like the last commit was co-authored without a CLA.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@MeAkib
fixup! fix(@schematics/angular): set explicit type for the app-shell …
e15fff0
…component
@MeAkib
MeAkib force-pushed the fix/app-shell-component-type branch from ffdecff to e15fff0 Compare October 27, 2026 08:39
@MeAkib
MeAkib requested a review from alan-agius4 October 27, 2026 09:08
@MeAkib

MeAkib commented Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

@MeAkib looks like the last commit was co-authored without a CLA.

Fixed

alan-agius4 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

alan-agius4
alan-agius4 approved these changes Oct 27, 2026
View reviewed changes
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Oct 27, 2026
@alan-agius4
alan-agius4 merged commit 0be52a8 into angular:main Oct 27, 2026
40 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@alan-agius4

alan-agius4 commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

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

  • main: 0be52a8
  • 22.2.x: e9ae950
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@MeAkib
MeAkib deleted the fix/app-shell-component-type branch October 27, 2026 15:05
This was referenced Nov 11, 2026
ng generate application produces a missing stylesheet when a workspace component type is configured #34684
Open
fix(@schematics/angular): set explicit type for the application root component #34685
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@alan-agius4 alan-agius4 alan-agius4 approved these changes
+2 more reviewers
@thekhegay thekhegay thekhegay left review comments
@gemini-code-assist gemini-code-assist[bot] gemini-code-assist[bot] left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

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

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

ng generate app-shell and ng generate module --route produce broken imports when a component type is configured

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@MeAkib @alan-agius4 @thekhegay
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.