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
commented
Oct 20, 2026
•
edited by alan-agius4
Loading
Uh oh!
There was an error while loading. Please reload this page.
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
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.
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
`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 looks like the last commit was co-authored without a CLA.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
@MeAkib looks like the last commit was co-authored without a CLA.
Fixed
|
alan-agius4 reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
|
This PR was merged into the repository. The changes were merged into the following branches:
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 11, 2026
Reviewers
+2 more reviewers
Reviewers whose approvals may not affect merge requirements
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
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.
|