Title: ViewContainerRef.createComponent with svg component · Issue #34866 · angular/angular · GitHub
Open Graph Title: ViewContainerRef.createComponent with svg component · Issue #34866 · angular/angular
X Title: ViewContainerRef.createComponent with svg component · Issue #34866 · angular/angular
Description: 🐞 bug report Affected Package @angular/core Is this a regression? No Description Say I have this svg path component @Component({ selector: 'svg:g[app-path]', // have tried with both svg:g[app-path] and g[app-path] templateUrl: './path.co...
Open Graph Description: 🐞 bug report Affected Package @angular/core Is this a regression? No Description Say I have this svg path component @Component({ selector: 'svg:g[app-path]', // have tried with both svg:g[app-path]...
X Description: 🐞 bug report Affected Package @angular/core Is this a regression? No Description Say I have this svg path component @Component({ selector: 'svg:g[app-path]', // have tried with both svg:g[a...
Opengraph URL: https://github.com/angular/angular/issues/34866
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ViewContainerRef.createComponent with svg component","articleBody":"# 🐞 bug report\r\n\r\n### Affected Package\r\n@angular/core\r\n\r\n### Is this a regression?\r\nNo\r\n\r\n### Description\r\n\r\nSay I have this svg path component\r\n```ts\r\n@Component({\r\n selector: 'svg:g[app-path]', // have tried with both svg:g[app-path] and g[app-path]\r\n templateUrl: './path.component.html',\r\n styleUrls: ['./path.component.css']\r\n})\r\nexport class PathComponent {}\r\n```\r\n\r\nWhen using ViewContainerRef and ComponentFactoryResolver to dynamically load a component.\r\nIt doesn't create the element with the correct namespace.\r\n\r\nThe component is created, but if I look into the properties panel of chrome devtools I can see that it's not correctly being set as a SVGGElement, but instead a HTMLUnknownElement.\r\n\r\nI'm guessing this is because somewhere, someone isn't paying attention to that the component getting loaded could be an svg component.\r\n\r\n## 🔬 Minimal Reproduction\r\nhttps://stackblitz.com/edit/angular-dynamically-load-svg?file=README.md\r\n\r\n## 🔥 Exception or Error\r\nHTMLUnknownElement instead of SVGGElement\r\n\r\n\r\n## 🌍 Your Environment\r\n\r\n**Angular Version:**\r\nAngular 9-rc.9 locally\r\nAnd stackblitz, which is running 8, same problem.","author":{"url":"https://github.com/leon","@type":"Person","name":"leon"},"datePublished":"2020-01-20T13:49:41Z","url":"https://github.com/angular/angular/issues/34866"}
| 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:3ec5b8fd-9eee-041e-5b58-9b104f2d0372 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CE6A:311EEE:1878764:2066475:6B0140F3 |
| html-safe-nonce | fe9328928363dff232f65fa5ff656d9e1531c60ca03c8cee8f7afb4837107890 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRTZBOjMxMUVFRToxODc4NzY0OjIwNjY0NzU6NkIwMTQwRjMiLCJ2aXNpdG9yX2lkIjoiMjEwMTM1Mjc4OTA0ODM3NzU4NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3115b4572b9f9a62f8e05425d91f24ec557958c90efcf815d07744bde626b7d1 |
| hovercard-subject-tag | issue:552311742 |
| 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/34866/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e269d02d987ad567ebab184fe55e86696ad902d27ee38c87db76731cb2d78f8c/angular/angular/issues/34866 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e269d02d987ad567ebab184fe55e86696ad902d27ee38c87db76731cb2d78f8c/angular/angular/issues/34866 |
| og:image:alt | 🐞 bug report Affected Package @angular/core Is this a regression? No Description Say I have this svg path component @Component({ selector: 'svg:g[app-path]', // have tried with both svg:g[app-path]... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | leon |
| 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