Title: Proposal: Input as Observable · Issue #5689 · angular/angular · GitHub
Open Graph Title: Proposal: Input as Observable · Issue #5689 · angular/angular
X Title: Proposal: Input as Observable · Issue #5689 · angular/angular
Description: Sorry, I'm not good at English. @Input property values are provided by parent component. The changes come asynchronously. And if Input property was changed in the child component (it has the property as own property) , its change detecto...
Open Graph Description: Sorry, I'm not good at English. @Input property values are provided by parent component. The changes come asynchronously. And if Input property was changed in the child component (it has the proper...
X Description: Sorry, I'm not good at English. @Input property values are provided by parent component. The changes come asynchronously. And if Input property was changed in the child component (it has the pr...
Mail addresses
conduct@angular.io
Opengraph URL: https://github.com/angular/angular/issues/5689
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Proposal: Input as Observable","articleBody":"Sorry, I'm not good at English.\n\n`@Input` property values are provided by parent component. The changes come asynchronously.\nAnd if Input property was changed in the child component (it has the property as own property) , its change detector never notice it.\n## Goal\n- Parent's input data and child's input property should be synchronized.\n- Developers should understand that input properties are changed asynchronously.\n## Proposal\n\n``` js\n@Component({ selector: \"child\" })\nclass Child {\n @Input(\"input\") inputValue: Observable\u003cT>;\n\n ngOnInit() {\n this.inputValue.map((value)=>...);\n }\n}\n\n@Component({\n template: `\n \u003cchild [input]=\"valueToChild\">\u003c/child>\n `\n})\nclass Parent {\n valueToChild: T;\n}\n```\n\nAbove code does not work. Currently, to receive input as `Observable\u003cT>`, I must write it like below.\n\n``` js\n@Component({ selector: \"child\" })\nclass Child {\n @Input(\"input\") inputValue: Observable\u003cT>\n}\n\n@Component({\n template: `\n \u003cchild [input]=\"valueToChild\">\u003c/child>\n `\n})\nclass Parent {\n valueToChild: Observable\u003cT> = new Observable\u003cT>((observer)=>{\n ...\n observer.next(val);\n });\n}\n```\n\nExample: http://plnkr.co/edit/BWziQygApOezTENdTVp1?p=preview\n\nThis works well, but it's not essential. Parent's input data is a simple data originally.\n\nI think this proposal make us happy. \n\nThanks.\n","author":{"url":"https://github.com/lacolaco","@type":"Person","name":"lacolaco"},"datePublished":"2015-12-08T02:32:29Z","url":"https://github.com/angular/angular/issues/5689"}
| 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:6ba47f16-1bb6-d5fc-e11e-adc1228afda4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9FD2:1EC9BC:1A469C3:217E0D1:6B014FB9 |
| html-safe-nonce | c33f24d7df1f0e4236a04ee14962befd0152c6e45e81bd32a0b8397d3598731d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RkQyOjFFQzlCQzoxQTQ2OUMzOjIxN0UwRDE6NkIwMTRGQjkiLCJ2aXNpdG9yX2lkIjoiMTQxNjA1MTg3NDYzMjY1MDY4MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ae3ef162a3654c39f546bd2df490075bd42551fb27e41f63c47302bb2d87a769 |
| hovercard-subject-tag | issue:120916636 |
| 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/5689/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cf8fc991faccccf57c71418c75d4f87cd84843deb206845e03f05be8c03b8f3f/angular/angular/issues/5689 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cf8fc991faccccf57c71418c75d4f87cd84843deb206845e03f05be8c03b8f3f/angular/angular/issues/5689 |
| og:image:alt | Sorry, I'm not good at English. @Input property values are provided by parent component. The changes come asynchronously. And if Input property was changed in the child component (it has the proper... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | lacolaco |
| 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