Title: Parse HTML templates to extract stubs from expressions & statements, then generate getters/setters stubs for reflection · Issue #501 · angular/angular · GitHub
Open Graph Title: Parse HTML templates to extract stubs from expressions & statements, then generate getters/setters stubs for reflection · Issue #501 · angular/angular
X Title: Parse HTML templates to extract stubs from expressions & statements, then generate getters/setters stubs for reflection · Issue #501 · angular/angular
Description: Depends on #503 HTML Templates contain expressions and statements. These need to be extracted so that we can generate getters and setter stubs (in subsequent iteration we can generate ChangeDetection classes which are more efficient #502...
Open Graph Description: Depends on #503 HTML Templates contain expressions and statements. These need to be extracted so that we can generate getters and setter stubs (in subsequent iteration we can generate ChangeDetecti...
X Description: Depends on #503 HTML Templates contain expressions and statements. These need to be extracted so that we can generate getters and setter stubs (in subsequent iteration we can generate ChangeDetecti...
Opengraph URL: https://github.com/angular/angular/issues/501
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Parse HTML templates to extract stubs from expressions & statements, then generate getters/setters stubs for reflection","articleBody":"Depends on #503\n\nHTML Templates contain expressions and statements. These need to be extracted so that we can generate getters and setter stubs (in subsequent iteration we can generate ChangeDetection classes which are more efficient #502) \n\nGiven HTML such as:\n\n```\n{{list.name}}\n\u003cul>\n \u003cli template=\"for: var i in items\">{{item.description}}\u003c/li>\n\u003c/ul>\n```\n\nShould generate these getters:\n\n```\nreflector.registerGetter({\n \"list\": (o) => o.list,\n \"name\": (o) => o.name,\n \"items\": (o) => o.items,\n \"item\": (o) => o.item,\n \"description\": (o) => o.description,\n});\n```\n\nAngular already has a parser which can extract all of the getters from the template. The parser is part of the Angular [`Compiler`](https://github.com/angular/angular/blob/master/modules/core/src/compiler/compiler.js). Which consumes template and generates [`ProtoView`](https://github.com/angular/angular/blob/master/modules/core/src/compiler/view.js#L247). The `ProtoView` contains [`ProtoChangeDetector`](https://github.com/angular/angular/blob/master/modules/change_detection/src/proto_change_detector.js) which in turn contains [`ProtoRecord`](https://github.com/angular/angular/blob/master/modules/change_detection/src/proto_change_detector.js). The `ProtoRecord` contains `name` field which corresponds to the getter.\n\nThe transformer needs to pass the template through the compiler and then iterate over the `ProtoRecord`s to collect all of the getters.\n\nNOTE: The compiler works on DOM API. In order to execute outside the browser we need to create DOM facade so that it can execute in the transformer. See #503.\n\nNOTE: The above example does not have type information added, but such information can be extracted and added in subsequent improvements.\n","author":{"url":"https://github.com/mhevery","@type":"Person","name":"mhevery"},"datePublished":"2015-01-30T16:48:11Z","url":"https://github.com/angular/angular/issues/501"}
| 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:d97042af-9f8a-8f72-8bc1-07b87fca7394 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CE22:237673:C53DD2:108B0C6:6B00FC1D |
| html-safe-nonce | 064d4afe9ce2dea858208451b007ba3a8f76415c992734607e3fbe693da3cf98 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRTIyOjIzNzY3MzpDNTNERDI6MTA4QjBDNjo2QjAwRkMxRCIsInZpc2l0b3JfaWQiOiIzODY0NTcxMDc3NDg5MzkyNjY5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 76288f8aa85bb9b3e1998e33a3c68d6ee813c6ebf678dbeaf8881a4895350fed |
| hovercard-subject-tag | issue:56056487 |
| 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/501/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f8d07880a138b991aeb500be73f1bb49a4f5ea73f327eefeb008091318a3bc30/angular/angular/issues/501 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f8d07880a138b991aeb500be73f1bb49a4f5ea73f327eefeb008091318a3bc30/angular/angular/issues/501 |
| og:image:alt | Depends on #503 HTML Templates contain expressions and statements. These need to be extracted so that we can generate getters and setter stubs (in subsequent iteration we can generate ChangeDetecti... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mhevery |
| 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