Title: Ivy: Render HTML from String / dynamic rendering · Issue #44660 · angular/angular · GitHub
Open Graph Title: Ivy: Render HTML from String / dynamic rendering · Issue #44660 · angular/angular
X Title: Ivy: Render HTML from String / dynamic rendering · Issue #44660 · angular/angular
Description: Which @angular/* package(s) are relevant/releated to the feature request? compiler, core, platform-browser-dynamic, platform-browser Description As far as I know the old aproach was to inject the JITCompiler and use it to render your HTM...
Open Graph Description: Which @angular/* package(s) are relevant/releated to the feature request? compiler, core, platform-browser-dynamic, platform-browser Description As far as I know the old aproach was to inject the J...
X Description: Which @angular/* package(s) are relevant/releated to the feature request? compiler, core, platform-browser-dynamic, platform-browser Description As far as I know the old aproach was to inject the J...
Opengraph URL: https://github.com/angular/angular/issues/44660
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Ivy: Render HTML from String / dynamic rendering","articleBody":"### Which @angular/* package(s) are relevant/releated to the feature request?\n\ncompiler, core, platform-browser-dynamic, platform-browser\n\n### Description\n\nAs far as I know the old aproach was to inject the JITCompiler and use it to render your HTML in an anonymous component.\r\nThis worked so far. I use editable HTML in DB which uses key features as substituting variables and directives like *ngIf or *ngSwitch.\r\n\r\nWhich does not work anymore in production mode (Angular 12.x)\r\nI browsed stackoverflow and other forums to find an workarround for this and these are not working anymore (like loading the JITCompiler into Providers, which results in \"JIT Compiler unavailable\". \r\n \r\nAs I found not soulution for ivy/ng 12 i considered this feature as still missing. \r\n\r\nBest,\r\n\r\nMalte\r\n\n\n### Proposed solution\n\nComponent to render html strings.\r\n\r\nExample:\r\n``` Html\r\n\u003crender-component [html]=\"...\" [render-data]=\"{ show: true}>\u003c/render-component>\r\n````\r\n\r\n[html] has the following value:\r\n``` Javascript\r\n\"\u003cp *ngIf=\\\"show\\\">Hello!\u003c/p>\"\r\n```\r\n\r\nWhich display in the case if show is true:\r\n\r\n``` Html\r\n\u003cp>Hello!\u003c/p>\r\n```\r\n\r\n\n\n### Alternatives considered\n\nAn Service to render html on the fly.\r\n\r\n\r\nE.g.:\r\n\r\n[p3x-compile](https://github.com/patrikx3/angular-compile)\r\n[Html Compile](https://github.com/codehint-ng/ng-controls/blob/master/projects/html-compiler/src/lib/html-compiler.component.ts)\r\n\r\n","author":{"url":"https://github.com/nfMalde","@type":"Person","name":"nfMalde"},"datePublished":"2022-01-07T15:35:14Z","url":"https://github.com/angular/angular/issues/44660"}
| 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:b209ab1b-e4f9-bac0-9399-c66d21796821 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E09A:215B92:EE9F90:13E6484:6B010BA8 |
| html-safe-nonce | 97ec267e96893d0be2a063cfd70871cb67563acf6141b9e9f7519c41985f265b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMDlBOjIxNUI5MjpFRTlGOTA6MTNFNjQ4NDo2QjAxMEJBOCIsInZpc2l0b3JfaWQiOiI2Nzk4MDc2MjE3ODgzOTU0MDg4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | f3a7865f138d8e0f34ab7bbcd589b862b29281c6e3f864ba10eb9c547f7eba9f |
| hovercard-subject-tag | issue:1096424881 |
| 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/44660/issue_layout |
| twitter:image | https://opengraph.githubassets.com/acd3b8f34e19425a4668286c3c60ae706dfd69d2477365e7de1eb2d0b493dd83/angular/angular/issues/44660 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/acd3b8f34e19425a4668286c3c60ae706dfd69d2477365e7de1eb2d0b493dd83/angular/angular/issues/44660 |
| og:image:alt | Which @angular/* package(s) are relevant/releated to the feature request? compiler, core, platform-browser-dynamic, platform-browser Description As far as I know the old aproach was to inject the J... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nfMalde |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124 |
| 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 | 2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width