Title: Add extended diagnostic to warn when an attribute is not interpreted as a binding · Issue #46137 · angular/angular · GitHub
Open Graph Title: Add extended diagnostic to warn when an attribute is not interpreted as a binding · Issue #46137 · angular/angular
X Title: Add extended diagnostic to warn when an attribute is not interpreted as a binding · Issue #46137 · angular/angular
Description: Which @angular/* package(s) are the source of the bug? core Is this a regression? No Description Angular does not properly bind an attribute when using attr.foo syntax if there is no interpolation present in the value. For example, this ...
Open Graph Description: Which @angular/* package(s) are the source of the bug? core Is this a regression? No Description Angular does not properly bind an attribute when using attr.foo syntax if there is no interpolation ...
X Description: Which @angular/* package(s) are the source of the bug? core Is this a regression? No Description Angular does not properly bind an attribute when using attr.foo syntax if there is no interpolation ...
Opengraph URL: https://github.com/angular/angular/issues/46137
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add extended diagnostic to warn when an attribute is not interpreted as a binding","articleBody":"### Which @angular/* package(s) are the source of the bug?\r\n\r\ncore\r\n\r\n### Is this a regression?\r\n\r\nNo\r\n\r\n### Description\r\n\r\nAngular does not properly bind an attribute when using `attr.foo` syntax if there is no interpolation present in the value.\r\n\r\nFor example, this does not work:\r\n\r\n`\u003cdiv attr.foo=\"bar\">\u003c/div> \u003c!-- erroneously keeps the attribute as \"attr.foo\" -->`\r\n\r\nThis DOES work:\r\n\r\n`\u003cdiv attr.foo=\"{{myProp}}\">\u003c/div>`\r\n\r\nThis also works:\r\n\r\n`\u003cdiv [attr.foo]=\"'bar'\">\u003c/div>`\r\n\r\n### Please provide a link to a minimal reproduction of the bug\r\n\r\nhttps://stackblitz.com/edit/angular-ivy-ybks1w?file=src%2Fapp%2Fapp.component.html,src%2Fapp%2Fapp.module.ts\r\n\r\n### Please provide the exception or error you saw\r\n\r\n```true\r\nThe attribute is not set properly on the element using `attr.foo` syntax when no interpolation is present.\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\nThe reproduction link is using Angular 13, but I also encountered this in my project which produces the following output for `ng version`:\r\n\r\n\r\nAngular CLI: 12.2.16\r\nNode: 14.19.3\r\nPackage Manager: npm 6.14.17\r\nOS: darwin x64\r\n\r\nAngular: 12.2.16\r\n... animations, cli, common, compiler, compiler-cli, core\r\n... elements, forms, language-service, localize\r\n... platform-browser, platform-browser-dynamic, router\r\n\r\nPackage Version\r\n---------------------------------------------------------\r\n@angular-devkit/architect 0.1202.16\r\n@angular-devkit/build-angular 12.2.16\r\n@angular-devkit/core 12.2.16\r\n@angular-devkit/schematics 12.2.16\r\n@angular/cdk 12.2.13\r\n@schematics/angular 12.2.16\r\nng-packagr 12.2.7\r\nrxjs 6.6.3\r\ntypescript 4.3.5\r\nwebpack 5.50.0\r\n```\r\n```\r\n\r\n\r\n### Anything else?\r\n\r\nI encountered this in my project previously on Angular 11 as well.","author":{"url":"https://github.com/antch","@type":"Person","name":"antch"},"datePublished":"2022-05-25T15:46:03Z","url":"https://github.com/angular/angular/issues/46137"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e4339dad-dd53-8878-cfb5-ca02b66d4f8f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D668:291B58:1F9F71:283018:6B00FD73 |
| html-safe-nonce | 36bd1eca5ca69eea90d13f219023c18de4c0437854e4c07fd68760cf38beefa7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENjY4OjI5MUI1ODoxRjlGNzE6MjgzMDE4OjZCMDBGRDczIiwidmlzaXRvcl9pZCI6IjI0NTg4ODA1MzQwODA3MTYxNDciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5a304cba5ef20f9913eafb2573bcb9281d53ddabe60c87ff47f6cb315414979a |
| hovercard-subject-tag | issue:1248301588 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/46137/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c78a4d92657d2f2f9046c2627291b4c7863aabd48bb4d822715021cc96af6a00/angular/angular/issues/46137 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c78a4d92657d2f2f9046c2627291b4c7863aabd48bb4d822715021cc96af6a00/angular/angular/issues/46137 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? core Is this a regression? No Description Angular does not properly bind an attribute when using attr.foo syntax if there is no interpolation ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | antch |
| hostname | github.com |
| expected-hostname | github.com |
| None | e208d86428ec00a57ade75058166297440e8128a01e5287c31a53dc042bbf187 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7dafd017fb7809a839c443dba08622af38e63c09 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width