Title: Ivy: Input fields inherited from abstract class cause runtime exception · Issue #32428 · angular/angular · GitHub
Open Graph Title: Ivy: Input fields inherited from abstract class cause runtime exception · Issue #32428 · angular/angular
X Title: Ivy: Input fields inherited from abstract class cause runtime exception · Issue #32428 · angular/angular
Description: Hey, Just tried 9.0.0-next.4 and it seems that when you have an abstract component class: export abstract class BaseEditFormComponent { @Input() itemId?: number; } And then you inherit it by specific components: @Component({ changeDetect...
Open Graph Description: Hey, Just tried 9.0.0-next.4 and it seems that when you have an abstract component class: export abstract class BaseEditFormComponent { @Input() itemId?: number; } And then you inherit it by specif...
X Description: Hey, Just tried 9.0.0-next.4 and it seems that when you have an abstract component class: export abstract class BaseEditFormComponent { @Input() itemId?: number; } And then you inherit it by specif...
Opengraph URL: https://github.com/angular/angular/issues/32428
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Ivy: Input fields inherited from abstract class cause runtime exception","articleBody":"Hey,\r\n\r\nJust tried `9.0.0-next.4` and it seems that when you have an abstract component class:\r\n\r\n```typescript\r\nexport abstract class BaseEditFormComponent {\r\n @Input() itemId?: number;\r\n}\r\n```\r\n\r\nAnd then you inherit it by specific components:\r\n\r\n```typescript\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n selector: 'edit-form',\r\n templateUrl: 'edit-form.component.html'\r\n})\r\nexport class EditFormComponent extends BaseEditFormComponent {\r\n constructor() {\r\n super();\r\n }\r\n}\r\n```\r\n\r\nAnd use it like:\r\n\r\n```typescript\r\n\u003cedit-form [itemId]=\"itemIdProp\">\u003c/edit-form>\r\n```\r\n\r\nYou get **runtime** exception such as \r\n\r\n```\r\nglobal-error.handler.ts:59 Application encountered an error: Error: Template error: Can't bind to 'itemId' since it isn't a known property of 'edit-form'.\r\n at createUnknownPropertyError (core.js:12888)\r\n at validateAgainstUnknownProperties (core.js:12827)\r\n at elementPropertyInternal (core.js:12732)\r\n at ɵɵproperty (core.js:19801)\r\n at EditFormComponent(template.html:2)\r\n at executeTemplate (core.js:12315)\r\n at refreshView (core.js:12179)\r\n at refreshComponent (core.js:13484)\r\n at refreshChildComponents (core.js:11914)\r\n at refreshView (core.js:12238)\r\n```\r\n\r\nAdding `itemId` property to `EditFormComponent ` component fixes the issue and app runs as expected. \r\n\r\nIs such behavior expected? \r\n\r\n## 🌍 Your Environment\r\n\r\n**Angular Version:**\r\n\u003cpre>\u003ccode>\r\nAngular CLI: 8.3.2\r\nNode: 10.16.0\r\nOS: win32 x64\r\nAngular: 9.0.0-next.4\r\n... animations, common, compiler, compiler-cli, core, forms\r\n... language-service, platform-browser, platform-browser-dynamic\r\n... platform-server, router, service-worker\r\n\r\nPackage Version\r\n-----------------------------------------------------------\r\n@angular-devkit/architect 0.803.2\r\n@angular-devkit/build-angular 0.803.2\r\n@angular-devkit/build-optimizer 0.803.2\r\n@angular-devkit/build-webpack 0.803.2\r\n@angular-devkit/core 8.3.2\r\n@angular-devkit/schematics 8.3.2\r\n@angular/cdk 8.1.4\r\n@angular/cli 8.3.2\r\n@angular/flex-layout 8.0.0-beta.27\r\n@angular/material 8.1.4\r\n@ngtools/webpack 8.3.2\r\n@schematics/angular 8.3.2\r\n@schematics/update 0.803.2\r\nrxjs 6.5.2\r\ntypescript 3.5.3\r\nwebpack 4.39.2\r\n\r\n\u003c/code>\u003c/pre>\r\n\r\n\r\n","author":{"url":"https://github.com/Enngage","@type":"Person","name":"Enngage"},"datePublished":"2019-08-31T09:05:37Z","url":"https://github.com/angular/angular/issues/32428"}
| 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:f4b22171-69e4-2f70-114c-052eeb9dbe4a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D522:1EC9BC:151166C:1ADC1DA:6B0130F9 |
| html-safe-nonce | f7930eba08d10e642d87d05faa24b318225e58aa5efeb0d850b3e69f372469c8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENTIyOjFFQzlCQzoxNTExNjZDOjFBREMxREE6NkIwMTMwRjkiLCJ2aXNpdG9yX2lkIjoiNjY2OTEwMjE4NDM2ODE3MTQ2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | c210120fd7150911abc7bc8674b21da673fc806a135cdc07beeef4393c4d2dfb |
| hovercard-subject-tag | issue:487749211 |
| 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/32428/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c578e00301062187b9a6e03fa9364fdb5052d74bd0233ac9f8625c436ab31699/angular/angular/issues/32428 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c578e00301062187b9a6e03fa9364fdb5052d74bd0233ac9f8625c436ab31699/angular/angular/issues/32428 |
| og:image:alt | Hey, Just tried 9.0.0-next.4 and it seems that when you have an abstract component class: export abstract class BaseEditFormComponent { @Input() itemId?: number; } And then you inherit it by specif... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Enngage |
| 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