René's URL Explorer Experiment


Title: NG8011: Node matches the X slot of the Y component, but will not be projected into the specific slot because the surrounding @if has more than one node at its root. · Issue #54077 · angular/angular · GitHub

Open Graph Title: NG8011: Node matches the X slot of the Y component, but will not be projected into the specific slot because the surrounding @if has more than one node at its root. · Issue #54077 · angular/angular

X Title: NG8011: Node matches the X slot of the Y component, but will not be projected into the specific slot because the surrounding @if has more than one node at its root. · Issue #54077 · angular/angular

Description: Which @angular/* package(s) are the source of the bug? compiler Is this a regression? Yes Description I have the following code which causes a warning during compilation, but the warning suggests fixes that don't apply to the code in que...

Open Graph Description: Which @angular/* package(s) are the source of the bug? compiler Is this a regression? Yes Description I have the following code which causes a warning during compilation, but the warning suggests f...

X Description: Which @angular/* package(s) are the source of the bug? compiler Is this a regression? Yes Description I have the following code which causes a warning during compilation, but the warning suggests f...

Opengraph URL: https://github.com/angular/angular/issues/54077

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"NG8011: Node matches the X slot of the Y component, but will not be projected into the specific slot because the surrounding @if has more than one node at its root.","articleBody":"### Which @angular/* package(s) are the source of the bug?\r\n\r\ncompiler\r\n\r\n### Is this a regression?\r\n\r\nYes\r\n\r\n### Description\r\n\r\nI have the following code which causes a warning during compilation, but the warning suggests fixes that don't apply to the code in question.\r\n\r\n```html\r\n  \u003cmat-form-field subscriptSizing=\"dynamic\">\r\n    \u003cmat-label>Phone Number\u003c/mat-label>\r\n    \u003cinput\r\n      matInput\r\n      [formControl]=\"form.controls.phoneNumber\"\r\n      required\r\n      type=\"tel\"\r\n    />\r\n    @if (form.controls.phoneNumber.hasError('isPhoneNumber')) {\r\n      \u003cmat-error>Must be a valid U.S. phone number\u003c/mat-error>\r\n    }\r\n  \u003c/mat-form-field>\r\n```\r\n\r\nThis caused the following compiler warning, followed by some suggestions to fix it.\r\n\r\n> NG8011: Node matches the \"mat-error, [matError]\" slot of the \"MatFormField\" component, but will not be projected into the specific slot because the surrounding @if has more than one node at its root.\r\n\r\nThe bug here is that **there is not more than one node at the root of the @if**. Suggestion 1 is basically already in-place, suggestion 2 is impossible, and section 3 is already in-place.\r\n\r\nNote that this is not a duplicate of #53477, because #53477 is a case where the content does need to be split/wrapped.\r\n\r\n### Please provide a link to a minimal reproduction of the bug\r\n\r\n_No response_\r\n\r\n### Please provide the exception or error you saw\r\n\r\n```true\r\nThe compiler error is as follows:\r\n\r\n\r\nWarning: src/app/@shared/send-it/send-it.component.html:14:7 - warning NG8011: Node matches the \"mat-error, [matError]\" slot of the \"MatFormField\" component, but will not be projected into the specific slot because the surrounding @if has more than one node at its root. To project the node in the right slot, you can:\r\n\r\n1. Wrap the content of the @if block in an \u003cng-container/> that matches the \"mat-error, [matError]\" selector.\r\n2. Split the content of the @if block across multiple @if blocks such that each one only has a single projectable node at its root.\r\n3. Remove all content from the @if block, except for the node being projected.\r\nNote: the host component has `preserveWhitespaces: true` which may cause whitespace to affect content projection.\r\n\r\nThis check can be disabled using the `extendedDiagnostics.checks.controlFlowPreventingContentProjection = \"suppress\" compiler option.`\r\n\r\n14       \u003cmat-error>Must be a valid U.S. phone number\u003c/mat-error>\r\n         ~~~~~~~~~~~\r\n\r\n  src/app/@shared/send-it/send-it.component.ts:15:16\r\n    15   templateUrl: './send-it.component.html',\r\n                      ~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    Error occurs in the template of component SendItComponent.\r\n```\r\n\r\n\r\n### Please provide the environment you discovered this bug in (run `ng version`)\r\n\r\n```true\r\nAngular CLI: 17.1.1\r\nNode: 18.18.0\r\nPackage Manager: yarn 1.22.19\r\nOS: darwin arm64\r\n\r\nAngular: 17.1.0\r\n... animations, cdk, common, compiler, compiler-cli, core, forms\r\n... language-service, localize, material, platform-browser\r\n... platform-browser-dynamic, router, service-worker\r\n\r\nPackage                         Version\r\n---------------------------------------------------------\r\n@angular-devkit/architect       0.1701.1\r\n@angular-devkit/build-angular   17.1.1\r\n@angular-devkit/core            17.1.1\r\n@angular-devkit/schematics      17.1.1\r\n@angular/cli                    17.1.1\r\n@angular/pwa                    17.1.1\r\n@schematics/angular             17.1.1\r\nrxjs                            7.8.1\r\ntypescript                      5.3.3\r\nzone.js                         0.14.3\r\n```\r\n\r\n\r\n### Anything else?\r\n\r\nThis happens in many other similar (one root node inside the `@if`) instances--not always MatFormField, even--across my application.","author":{"url":"https://github.com/Kerrick","@type":"Person","name":"Kerrick"},"datePublished":"2024-01-25T17:21:14Z","url":"https://github.com/angular/angular/issues/54077"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:2d3f9230-62e5-23e5-24b3-99122cb6d7fc
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA3E8:D0E46:1296B42:188BEA5:6B011A01
html-safe-nonced19098fbc48a0c35112b131762804585d7abb4f925640f4c1c71f41aac2b9a40
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBM0U4OkQwRTQ2OjEyOTZCNDI6MTg4QkVBNTo2QjAxMUEwMSIsInZpc2l0b3JfaWQiOiIxMDE4NjcyMDUxNDc4NjY1NzI5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac29eb9449aeb8599fa338cf942884e529443041f37f56775d52cccbb05deee295
hovercard-subject-tagissue:2100847504
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/54077/issue_layout
twitter:imagehttps://opengraph.githubassets.com/1f8229e94b752ecd034b8c2c77c8c3d32bc5736eef83e7211de40541ac2ca1e7/angular/angular/issues/54077
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/1f8229e94b752ecd034b8c2c77c8c3d32bc5736eef83e7211de40541ac2ca1e7/angular/angular/issues/54077
og:image:altWhich @angular/* package(s) are the source of the bug? compiler Is this a regression? Yes Description I have the following code which causes a warning during compilation, but the warning suggests f...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameKerrick
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/angular/angular git https://github.com/angular/angular.git
octolytics-dimension-user_id139426
octolytics-dimension-user_loginangular
octolytics-dimension-repository_id24195339
octolytics-dimension-repository_nwoangular/angular
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id24195339
octolytics-dimension-repository_network_root_nwoangular/angular
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/angular/angular/issues/54077#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fissues%2F54077
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fissues%2F54077
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=angular%2Fangular
Reloadhttps://github.com/angular/angular/issues/54077
Reloadhttps://github.com/angular/angular/issues/54077
Reloadhttps://github.com/angular/angular/issues/54077
angularhttps://github.com/angular
angularhttps://github.com/angular/angular
Codehttps://github.com/angular/angular
Issues835 (835)https://github.com/angular/angular/issues
Pull requests141 (141)https://github.com/angular/angular/pulls
Discussionshttps://github.com/angular/angular/discussions
Actionshttps://github.com/angular/angular/actions
Projectshttps://github.com/angular/angular/projects
Security and quality40 (40)https://github.com/angular/angular/security
Insightshttps://github.com/angular/angular/insights
https://github.com/angular/angular
New issuehttps://github.com/login?return_to=https://github.com/angular/angular/issues/54077
New issuehttps://github.com/login?return_to=https://github.com/angular/angular/issues/54077
NG8011: Node matches the X slot of the Y component, but will not be projected into the specific slot because the surrounding @if has more than one node at its root.https://github.com/angular/angular/issues/54077#top
https://github.com/pkozlowski-opensource
area: compilerIssues related to `ngc`, Angular's template compilerhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20compiler%22
area: coreIssues related to the framework runtimehttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20core%22
core: control flowIssues related to the built-in control flow (@if, @for, @switch)https://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22core%3A%20control%20flow%22
needsTriagehttps://github.com/angular/angular/milestone/83
https://github.com/Kerrick
Kerrickhttps://github.com/Kerrick
on Jan 25, 2024https://github.com/angular/angular/issues/54077#issue-2100847504
@ifhttps://github.com/if
@ifhttps://github.com/if
#53477https://github.com/angular/angular/issues/53477
#53477https://github.com/angular/angular/issues/53477
https://github.com/pkozlowski-opensource
pkozlowski-opensourcehttps://github.com/pkozlowski-opensource
on Jan 25, 2024https://github.com/angular/angular/issues/54077#issuecomment-1910667685
https://github.com/Kerrick
Kerrickhttps://github.com/Kerrick
on Jan 25, 2024https://github.com/angular/angular/issues/54077#issuecomment-1910671356
jessicajaniukhttps://github.com/jessicajaniuk
area: compilerIssues related to `ngc`, Angular's template compilerhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20compiler%22
on Jan 25, 2024https://github.com/angular/angular/issues/54077#event-11600795253
ngbothttps://github.com/apps/ngbot
needsTriagehttps://github.com/angular/angular/milestone/83
on Jan 25, 2024https://github.com/angular/angular/issues/54077#event-11600795521
https://github.com/jessicajaniuk
jessicajaniukhttps://github.com/jessicajaniuk
on Jan 25, 2024https://github.com/angular/angular/issues/54077#issuecomment-1910731043
pkozlowski-opensourcehttps://github.com/pkozlowski-opensource
core: control flowIssues related to the built-in control flow (@if, @for, @switch)https://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22core%3A%20control%20flow%22
area: coreIssues related to the framework runtimehttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20core%22
on Jan 25, 2024https://github.com/angular/angular/issues/54077#event-11602355981
https://github.com/crisbeto
crisbetohttps://github.com/crisbeto
on Jan 25, 2024https://github.com/angular/angular/issues/54077#issuecomment-1911094252
https://github.com/Kerrick
Kerrickhttps://github.com/Kerrick
on Jan 26, 2024https://github.com/angular/angular/issues/54077#issuecomment-1911279094
https://github.com/JelleBruisten
JelleBruistenhttps://github.com/JelleBruisten
on Jan 29, 2024https://github.com/angular/angular/issues/54077#issuecomment-1914238907
@Kerrickhttps://github.com/Kerrick
https://github.com/Lavos96
Lavos96https://github.com/Lavos96
on Mar 1, 2024https://github.com/angular/angular/issues/54077#issuecomment-1972997952
pkozlowski-opensourcehttps://github.com/pkozlowski-opensource
on Mar 13, 2024https://github.com/angular/angular/issues/54077#event-12103003659
fix(compiler): improve error message for control flow and content pro…https://github.com/pkozlowski-opensource/angular/commit/9b4295de9e2c1da56aa45b85ffca23ca58b6fc38
9b4295dhttps://github.com/pkozlowski-opensource/angular/commit/9b4295de9e2c1da56aa45b85ffca23ca58b6fc38
pkozlowski-opensourcehttps://github.com/pkozlowski-opensource
on Mar 14, 2024https://github.com/angular/angular/issues/54077#event-12117270183
https://github.com/Kerrick
Kerrickhttps://github.com/Kerrick
on Mar 25, 2024https://github.com/angular/angular/issues/54077#issuecomment-2018355507
this commithttps://github.com/angular/angular/commit/eb153584791a30a015469269a62fc9eb43dbf16a
#52277https://github.com/angular/angular/issues/52277
https://github.com/raknjarasoa
raknjarasoahttps://github.com/raknjarasoa
on May 2, 2024https://github.com/angular/angular/issues/54077#issuecomment-2090867409
https://github.com/Chuli2k
Chuli2khttps://github.com/Chuli2k
on May 26, 2024https://github.com/angular/angular/issues/54077#issuecomment-2132370250
@raknjarasoahttps://github.com/raknjarasoa
https://github.com/sherlock1982
sherlock1982https://github.com/sherlock1982
on Jan 23, 2025https://github.com/angular/angular/issues/54077#issuecomment-2609838704
https://github.com/blidblid
blidblidhttps://github.com/blidblid
on Mar 27, 2025https://github.com/angular/angular/issues/54077#issuecomment-2758360292
https://github.com/JWess
JWesshttps://github.com/JWess
on Apr 1, 2025https://github.com/angular/angular/issues/54077#issuecomment-2770799363
https://github.com/davidpanic
davidpanichttps://github.com/davidpanic
on Apr 7, 2025https://github.com/angular/angular/issues/54077#issuecomment-2782471525
@blidblidhttps://github.com/blidblid
https://github.com/jackmorizo
jackmorizohttps://github.com/jackmorizo
on Apr 25, 2025https://github.com/angular/angular/issues/54077#issuecomment-2831575385
https://github.com/Spawnrad
Spawnradhttps://github.com/Spawnrad
on Jul 7, 2025https://github.com/angular/angular/issues/54077#issuecomment-3046286633
https://github.com/ahmad-ben
ahmad-benhttps://github.com/ahmad-ben
on Sep 15, 2025https://github.com/angular/angular/issues/54077#issuecomment-3293124643
https://github.com/davidefonta
davidefontahttps://github.com/davidefonta
on Nov 14, 2025https://github.com/angular/angular/issues/54077#issuecomment-3533780029
@ifhttps://github.com/if
@ifhttps://github.com/if
@ifhttps://github.com/if
@ifhttps://github.com/if
https://github.com/olfek
olfekhttps://github.com/olfek
on May 13, 2026https://github.com/angular/angular/issues/54077#issuecomment-4439504094
https://angular.dev/extended-diagnosticshttps://angular.dev/extended-diagnostics
Sign up for freehttps://github.com/signup?return_to=https://github.com/angular/angular/issues/54077
Sign in to commenthttps://github.com/login?return_to=https://github.com/angular/angular/issues/54077
pkozlowski-opensourcehttps://github.com/pkozlowski-opensource
area: compilerIssues related to `ngc`, Angular's template compilerhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20compiler%22
area: coreIssues related to the framework runtimehttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20core%22
core: control flowIssues related to the built-in control flow (@if, @for, @switch)https://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22core%3A%20control%20flow%22
needsTriageNo due datehttps://github.com/angular/angular/milestone/83
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.