Title: propName.toLowerCase is not a function · Issue #46936 · angular/angular · GitHub
Open Graph Title: propName.toLowerCase is not a function · Issue #46936 · angular/angular
X Title: propName.toLowerCase is not a function · Issue #46936 · angular/angular
Description: Which @angular/* package(s) are the source of the bug? compiler Is this a regression? No Description I think I've narrowed down the reason for this error. I created an @Input() binding with the name valueOf. I think the angular compiler ...
Open Graph Description: Which @angular/* package(s) are the source of the bug? compiler Is this a regression? No Description I think I've narrowed down the reason for this error. I created an @Input() binding with the nam...
X Description: Which @angular/* package(s) are the source of the bug? compiler Is this a regression? No Description I think I've narrowed down the reason for this error. I created an @Input() binding with the...
Opengraph URL: https://github.com/angular/angular/issues/46936
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"propName.toLowerCase is not a function","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\nNo\r\n\r\n### Description\r\n\r\nI think I've narrowed down the reason for this error. I created an `@Input()` binding with the name `valueOf`. I think the angular compiler doesn't like this name for some reason, but I can't find any documentation on this being the case. I forked one of the Angular Material examples and updated the example a bit to demonstrate the error. \r\n\r\n```typescript\r\n@Component({\r\n selector: 'app-value-of',\r\n template: '{{valueOf(\"abc\")}}'\r\n})\r\nexport class ValueOfComponent {\r\n @Input() valueOf: (s: string) => any = (s: string) => s;\r\n}\r\n\r\n@Component({\r\n selector: 'autocomplete-filter-example',\r\n template: '\u003capp-value-of [valueOf]=\"myValueOf\">\u003c/app-value-of>',\r\n})\r\nexport class AutocompleteFilterExample {\r\n myValueOf = (s: string) => 'something else';\r\n}\r\n```\r\n\r\n### Please provide a link to a minimal reproduction of the bug\r\n\r\nhttps://stackblitz.com/edit/angular-jyiqdv?file=src%2Fapp%2Fvalue-of.component.ts,src%2Fapp%2Fapp.module.ts,src%2Fapp%2Fautocomplete-filter-example.ts,src%2Fapp%2Fautocomplete-filter-example.css,src%2Fapp%2Fautocomplete-filter-example.html\r\n\r\n### Please provide the exception or error you saw\r\n\r\n```true\r\n./src/main.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):\r\nError: propName.toLowerCase is not a function\r\n at eval (/home/projects/angular-jyiqdv/node_modules/@ngtools/webpack/src/ivy/loader.js:81:18)\r\n\r\n./src/polyfills.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):\r\nError: propName.toLowerCase is not a function\r\n at eval (/home/projects/angular-jyiqdv/node_modules/@ngtools/webpack/src/ivy/loader.js:81:18)\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\nThis information can be found in the stackblitz reproduction. Looks like version 14.\r\n```\r\n\r\n\r\n### Anything else?\r\n\r\n_No response_","author":{"url":"https://github.com/Will-at-FreedomDev","@type":"Person","name":"Will-at-FreedomDev"},"datePublished":"2022-07-21T18:09:52Z","url":"https://github.com/angular/angular/issues/46936"}
| 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:013ed585-f6be-8b85-5598-7eade4171787 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E3BE:2652DC:160797F:1C2D22D:6B0121CE |
| html-safe-nonce | 12e8f1283559032c8e7404fd9edba704376af34e3732ac1dfb6e935ab8bf9ddd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFM0JFOjI2NTJEQzoxNjA3OTdGOjFDMkQyMkQ6NkIwMTIxQ0UiLCJ2aXNpdG9yX2lkIjoiNzYyMzIyOTk1NjE3NjI5MDI1NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | dd93c81f509fcbde6b1654d90a8be4a983f19a36b0a9f444aefed3a4b0413944 |
| hovercard-subject-tag | issue:1314696445 |
| 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/46936/issue_layout |
| twitter:image | https://opengraph.githubassets.com/618843e1125ff2fd470a48628af87ae82c4aa7e44768c729ee20b667be10c58f/angular/angular/issues/46936 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/618843e1125ff2fd470a48628af87ae82c4aa7e44768c729ee20b667be10c58f/angular/angular/issues/46936 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? compiler Is this a regression? No Description I think I've narrowed down the reason for this error. I created an @Input() binding with the nam... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Will-at-FreedomDev |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width