René's URL Explorer Experiment


Title: refactor(compiler): disallow unsupported bindings and attributes on ng-content and ng-template by JeanMeche · Pull Request #71887 · angular/angular · GitHub

Open Graph Title: refactor(compiler): disallow unsupported bindings and attributes on ng-content and ng-template by JeanMeche · Pull Request #71887 · angular/angular

X Title: refactor(compiler): disallow unsupported bindings and attributes on ng-content and ng-template by JeanMeche · Pull Request #71887 · angular/angular

Description: This PR extends compiler and template type-checking validation for virtual elements to and : Template transformation (r3_template_transform.ts): does not support attribute bindings ([attr.foo]). does not support property bindings ([id]), event bindings ((click)), or template references (#ref). Type Check Block (TcbContentAttributesOp in ngtsc and ngp): enforces an allowlist for static attributes: select (case-insensitive) ngProjectAs ngSkipHydration ngPreserveWhitespaces Also allows static attributes on when re-projecting into a parent component if the attribute selects a specific content projection slot of that parent component. If selection or selector is used on (and does not match a parent projection slot), a helpful suggestion is provided: 'selection'/'selector' is not supported on ng-content. Did you mean 'select'?. Also removes legacy compliance tests in r3_view_compiler_template that asserted unsupported attribute and class bindings on degraded to property bindings, and fixes invalid attributes found in existing tests and examples where slot="foo", selector="...", or class="..." were mistakenly used on .

Open Graph Description: This PR extends compiler and template type-checking validation for virtual elements to <ng-content> and <ng-template>: Template transformation (r3_template_transform.ts): <ng-templ...

X Description: This PR extends compiler and template type-checking validation for virtual elements to &lt;ng-content&gt; and &lt;ng-template&gt;: Template transformation (r3_template_transform.ts...

Opengraph URL: https://github.com/angular/angular/pull/71887

X: @github

direct link

Domain: github.com

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/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:d1d3b31b-16a9-3ea3-eb57-23a86967d901
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idCE3E:14F601:13132EB:1857EC8:6B010E2B
html-safe-nonce9f266f0f745ed23bc4d57a54951757e67d5164b9c8a0a6d15e19e8e1b1660af3
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRTNFOjE0RjYwMToxMzEzMkVCOjE4NTdFQzg6NkIwMTBFMkIiLCJ2aXNpdG9yX2lkIjoiMjkwNjQ0ODY2MDcwMTE4NzYyNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac45457869d3be7b83e03bdcfd3ec4d016098ad23755f68c036ab84ce67ac1e4f3
hovercard-subject-tagpull_request:5214583935
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/angular/angular/pull/71887/files
twitter:imagehttps://avatars.githubusercontent.com/u/1300985?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/1300985?s=400&v=4
og:image:altThis PR extends compiler and template type-checking validation for virtual elements to <ng-content> and <ng-template>: Template transformation (r3_template_transform.ts): <ng-templ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124
turbo-cache-controlno-preview
diff-viewunified
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 full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/angular/angular/pull/71887/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fpull%2F71887%2Ffiles
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%2Fpull%2F71887%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=angular%2Fangular
Reloadhttps://github.com/angular/angular/pull/71887/files
Reloadhttps://github.com/angular/angular/pull/71887/files
Reloadhttps://github.com/angular/angular/pull/71887/files
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
Sign up for GitHub https://github.com/signup?return_to=%2Fangular%2Fangular%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fangular%2Fangular%2Fissues%2Fnew%2Fchoose
JeanMechehttps://github.com/JeanMeche
angular:mainhttps://github.com/angular/angular/tree/main
JeanMeche:compiler-virtual-element-bindingshttps://github.com/JeanMeche/angular/tree/compiler-virtual-element-bindings
Conversation 6 https://github.com/angular/angular/pull/71887
Commits 1 https://github.com/angular/angular/pull/71887/commits
Checks 19 https://github.com/angular/angular/pull/71887/checks
Files changed https://github.com/angular/angular/pull/71887/files
Please reload this pagehttps://github.com/angular/angular/pull/71887/files
refactor(compiler): disallow unsupported bindings and attributes on ng-content and ng-template https://github.com/angular/angular/pull/71887/files#top
Show all changes 1 commit https://github.com/angular/angular/pull/71887/files
41017f3 refactor(compiler): disallow unsupported bindings and attributes on n… JeanMeche Nov 8, 2026 https://github.com/angular/angular/pull/71887/commits/41017f3af13033169ad4d66019dbc716383cb37e
Clear filters https://github.com/angular/angular/pull/71887/files
Please reload this pagehttps://github.com/angular/angular/pull/71887/files
Please reload this pagehttps://github.com/angular/angular/pull/71887/files
oob.ts https://github.com/angular/angular/pull/71887/files#diff-9180cedc6cc5ef0909186afebc066623107d374b5c27a4c684c7c10449e39099
oob.ts https://github.com/angular/angular/pull/71887/files#diff-50f9918c2a4813f5182f3ea879372d773ef9e0de7d1864f2923fb46a89953ef0
diagnostics_spec.ts https://github.com/angular/angular/pull/71887/files#diff-5d0a8394612d2d8f653ea59dfda0c809795c6bc38d2fee638849ea6f4a2fdbfd
index.ts https://github.com/angular/angular/pull/71887/files#diff-49fe94d4a7d4e7db381db4e750af7e031e9f33f09b3b89e29ab1f3fe7fa77546
ngp_typecheck_testing.ts https://github.com/angular/angular/pull/71887/files#diff-100419f25a4e2e834faff14f276b1fbdd2107bdacade14eba35b1b17dd1a1815
GOLDEN_PARTIAL.js https://github.com/angular/angular/pull/71887/files#diff-246c4098fdcdc9c11e436f24fc6e7b37c012ade188e4f75cec7e12280db6aa58
ng_content_fallback.js https://github.com/angular/angular/pull/71887/files#diff-0fd5169e28f83b1800e7b0cf5a6e8789208c2094ddd4d5d9cd1a054dc2b8dfe2
ng_content_fallback.ts https://github.com/angular/angular/pull/71887/files#diff-47027f13ab001bd1f4146dfd70e6edf5c216cbdc8b84b8926a55b4a03eb273db
ng_content_fallback_isolated.golden.d.ts https://github.com/angular/angular/pull/71887/files#diff-1b286c05059a792bab717aadc06c646d8668142a4cc8a404486a1aff6e830364
ng_content_with_structural_dir.js https://github.com/angular/angular/pull/71887/files#diff-7c357bd0ffb66b12411cf62b7b3be9f417f1addc800e5042898ca54513127399
ng_content_with_structural_dir.ts https://github.com/angular/angular/pull/71887/files#diff-c6283ed52affaf7dc0bc26708dfe75da18c4d47ef31cea9409a4a5d75a6a121c
ng_content_with_structural_dir_isolated.golden.d.ts https://github.com/angular/angular/pull/71887/files#diff-59dd0c2f03a1d01d0b5bce3b9f8308cda0ae1815cb5927188092b723d3d8d369
GOLDEN_PARTIAL.js https://github.com/angular/angular/pull/71887/files#diff-5d9a519991512f137ca41e413e5b95eedbba49dfaaabc9906e0e1b803e27582d
TEST_CASES.json https://github.com/angular/angular/pull/71887/files#diff-38df28f4d484511d15a6ef469c843ba3a9a0dfe6874b583af76bc2c946f3a0b8
ng_template_bindings.js https://github.com/angular/angular/pull/71887/files#diff-24e8f191b5eeb6e5e3b5efea500ddaf30360088b19249066fdfe58d669315aa0
ng_template_bindings.ts https://github.com/angular/angular/pull/71887/files#diff-8ab64b80cb8a185d2f805bcfa6110a638cb9220c75fba3d88b9d28cbd32de46d
self_closing_structural_directives.js https://github.com/angular/angular/pull/71887/files#diff-1e1bea0e8b4eed039cb421328be06a8974652cd482a1206a1ba70a9293ebca0f
unique_template_function_names_ng_content.js https://github.com/angular/angular/pull/71887/files#diff-a962217992c4bee64347703f67ec52aa1be9fa0fc9acd177a9d5796354e7d461
unique_template_function_names_ng_content.ts https://github.com/angular/angular/pull/71887/files#diff-11d1fe333dc8fc4b25fd38714937b4f501b8a10989a631609c4d26c0ee5e5ad8
unique_template_function_names_ng_content_isolated.golden.d.ts https://github.com/angular/angular/pull/71887/files#diff-fa78cb59e7b1cacaa82ad1130736a43aa432398730b3ec64a176b62f0cbb41fa
r3_template_transform.ts https://github.com/angular/angular/pull/71887/files#diff-bd2071834447626dd140448c977e33a8fae854b527a1dbdadc5d2be4108a48a3
template_preparser.ts https://github.com/angular/angular/pull/71887/files#diff-07b0bb2ac3e426f6086fc084aef24f448c1e3705867ca8aa0481d1d119e1fc55
oob.ts https://github.com/angular/angular/pull/71887/files#diff-4f66602645772b00110755d6dfb49e15316e9856736978271d8cd17f00d1f19b
content_projection.ts https://github.com/angular/angular/pull/71887/files#diff-5470be26709f59d2ee6374bdd70ac474556776d7f78d59c7ea71e09736f74412
context.ts https://github.com/angular/angular/pull/71887/files#diff-da206338b9d388289fabc00ff65f6ca575b3b715ec138e0af92b7989d5983a02
scope.ts https://github.com/angular/angular/pull/71887/files#diff-3b43d33e871d810344bc7a81ac0b3aa0260d5070ecd2ea513ad7aa5e2fda9464
r3_template_transform_spec.ts https://github.com/angular/angular/pull/71887/files#diff-9f7ec17dd7b96d636aa27b38871ecf47e86afc5823046637d19bac1918409746
util.ts https://github.com/angular/angular/pull/71887/files#diff-ecee869b7ca2c90d50eace745cfb13d2344edaf491487c9c1db0087f5d0f061f
module.ts https://github.com/angular/angular/pull/71887/files#diff-01abd59fc3c9ef7e7951a3339784db25b0c46fdb29ff16dda2c50f16949476b0
module.ts https://github.com/angular/angular/pull/71887/files#diff-2fd07d0cbad58343ba8aaa8eb7aa6d3deb1c3bf5d0f92de0ba428ca0b78da094
template_target_spec.ts https://github.com/angular/angular/pull/71887/files#diff-71d060be6ea7b005eea6eaa8c63e0d3f5a1e47c1b53943a7f4bd840a6eee5499
full_app_hydration_spec.ts https://github.com/angular/angular/pull/71887/files#diff-212384b7cadd1f6fd5c408cc3ae1a4fedd901b8210cfc7172e77d7fa0104c250
packages/compiler-cli/preprocessor/src/oob.tshttps://github.com/angular/angular/pull/71887/files#diff-9180cedc6cc5ef0909186afebc066623107d374b5c27a4c684c7c10449e39099
View file https://github.com/angular/angular/blob/41017f3af13033169ad4d66019dbc716383cb37e/packages/compiler-cli/preprocessor/src/oob.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/71887/{{ revealButtonHref }}
https://github.com/angular/angular/pull/71887/files#diff-9180cedc6cc5ef0909186afebc066623107d374b5c27a4c684c7c10449e39099
https://github.com/angular/angular/pull/71887/files#diff-9180cedc6cc5ef0909186afebc066623107d374b5c27a4c684c7c10449e39099
packages/compiler-cli/src/ngtsc/typecheck/src/oob.tshttps://github.com/angular/angular/pull/71887/files#diff-50f9918c2a4813f5182f3ea879372d773ef9e0de7d1864f2923fb46a89953ef0
View file https://github.com/angular/angular/blob/41017f3af13033169ad4d66019dbc716383cb37e/packages/compiler-cli/src/ngtsc/typecheck/src/oob.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/71887/{{ revealButtonHref }}
https://github.com/angular/angular/pull/71887/files#diff-50f9918c2a4813f5182f3ea879372d773ef9e0de7d1864f2923fb46a89953ef0
https://github.com/angular/angular/pull/71887/files#diff-50f9918c2a4813f5182f3ea879372d773ef9e0de7d1864f2923fb46a89953ef0
https://github.com/angular/angular/pull/71887/files#diff-50f9918c2a4813f5182f3ea879372d773ef9e0de7d1864f2923fb46a89953ef0
https://github.com/angular/angular/pull/71887/files#diff-50f9918c2a4813f5182f3ea879372d773ef9e0de7d1864f2923fb46a89953ef0
https://github.com/angular/angular/pull/71887/files#diff-50f9918c2a4813f5182f3ea879372d773ef9e0de7d1864f2923fb46a89953ef0
packages/compiler-cli/src/ngtsc/typecheck/test/diagnostics_spec.tshttps://github.com/angular/angular/pull/71887/files#diff-5d0a8394612d2d8f653ea59dfda0c809795c6bc38d2fee638849ea6f4a2fdbfd
View file https://github.com/angular/angular/blob/41017f3af13033169ad4d66019dbc716383cb37e/packages/compiler-cli/src/ngtsc/typecheck/test/diagnostics_spec.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/71887/{{ revealButtonHref }}
https://github.com/angular/angular/pull/71887/files#diff-5d0a8394612d2d8f653ea59dfda0c809795c6bc38d2fee638849ea6f4a2fdbfd
https://github.com/angular/angular/pull/71887/files#diff-5d0a8394612d2d8f653ea59dfda0c809795c6bc38d2fee638849ea6f4a2fdbfd
packages/compiler-cli/src/ngtsc/typecheck/testing/index.tshttps://github.com/angular/angular/pull/71887/files#diff-49fe94d4a7d4e7db381db4e750af7e031e9f33f09b3b89e29ab1f3fe7fa77546
View file https://github.com/angular/angular/blob/41017f3af13033169ad4d66019dbc716383cb37e/packages/compiler-cli/src/ngtsc/typecheck/testing/index.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/71887/{{ revealButtonHref }}
https://github.com/angular/angular/pull/71887/files#diff-49fe94d4a7d4e7db381db4e750af7e031e9f33f09b3b89e29ab1f3fe7fa77546
https://github.com/angular/angular/pull/71887/files#diff-49fe94d4a7d4e7db381db4e750af7e031e9f33f09b3b89e29ab1f3fe7fa77546
packages/compiler-cli/src/ngtsc/typecheck/testing/src/ngp_typecheck_testing.tshttps://github.com/angular/angular/pull/71887/files#diff-100419f25a4e2e834faff14f276b1fbdd2107bdacade14eba35b1b17dd1a1815
View file https://github.com/angular/angular/blob/41017f3af13033169ad4d66019dbc716383cb37e/packages/compiler-cli/src/ngtsc/typecheck/testing/src/ngp_typecheck_testing.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/71887/{{ revealButtonHref }}
https://github.com/angular/angular/pull/71887/files#diff-100419f25a4e2e834faff14f276b1fbdd2107bdacade14eba35b1b17dd1a1815
https://github.com/angular/angular/pull/71887/files#diff-100419f25a4e2e834faff14f276b1fbdd2107bdacade14eba35b1b17dd1a1815
...ses/r3_compiler_compliance/components_and_directives/content_projection/GOLDEN_PARTIAL.jshttps://github.com/angular/angular/pull/71887/files#diff-246c4098fdcdc9c11e436f24fc6e7b37c012ade188e4f75cec7e12280db6aa58
View file https://github.com/angular/angular/blob/41017f3af13033169ad4d66019dbc716383cb37e/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/content_projection/GOLDEN_PARTIAL.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/71887/{{ revealButtonHref }}
https://github.com/angular/angular/pull/71887/files#diff-246c4098fdcdc9c11e436f24fc6e7b37c012ade188e4f75cec7e12280db6aa58
https://github.com/angular/angular/pull/71887/files#diff-246c4098fdcdc9c11e436f24fc6e7b37c012ade188e4f75cec7e12280db6aa58
https://github.com/angular/angular/pull/71887/files#diff-246c4098fdcdc9c11e436f24fc6e7b37c012ade188e4f75cec7e12280db6aa58
https://github.com/angular/angular/pull/71887/files#diff-246c4098fdcdc9c11e436f24fc6e7b37c012ade188e4f75cec7e12280db6aa58
https://github.com/angular/angular/pull/71887/files#diff-246c4098fdcdc9c11e436f24fc6e7b37c012ade188e4f75cec7e12280db6aa58
https://github.com/angular/angular/pull/71887/files#diff-246c4098fdcdc9c11e436f24fc6e7b37c012ade188e4f75cec7e12280db6aa58
Please reload this pagehttps://github.com/angular/angular/pull/71887/files
Please reload this pagehttps://github.com/angular/angular/pull/71887/files
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.