Title: Dynamic component broken when using Standalone + aot: false · Issue #47996 · angular/angular · GitHub
Open Graph Title: Dynamic component broken when using Standalone + aot: false · Issue #47996 · angular/angular
X Title: Dynamic component broken when using Standalone + aot: false · Issue #47996 · angular/angular
Description: Which @angular/* package(s) are the source of the bug? compiler Is this a regression? No Description Suppose this single standalone component with a dynamic component inside : @Component({ selector: "app-root", template: " Open Graph Description: Which @angular/* package(s) are the source of the bug? compiler Is this a regression? No Description Suppose this single standalone component with a dynamic component inside : @Component({ selector...
X Description: Which @angular/* package(s) are the source of the bug? compiler Is this a regression? No Description Suppose this single standalone component with a dynamic component inside : @Component({ selector...
Opengraph URL: https://github.com/angular/angular/issues/47996
X: @github
Domain: github.com
Links:
Viewport: width=device-width
Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Dynamic component broken when using Standalone + aot: false ","articleBody":"### Which @angular/* package(s) are the source of the bug?\r\n\r\ncompiler\r\n\r\n### Is this a regression?\r\n\r\nNo\r\n\r\n### Description\r\n\r\nSuppose this single standalone component with a dynamic component inside : \r\n\r\n```\r\n@Component({\r\n selector: \"app-root\",\r\n template: \"\u003cdiv #container>OK\u003c/div>\",\r\n standalone: true,\r\n})\r\nexport class AppComponent implements OnInit {\r\n @ViewChild(\"container\", { read: ViewContainerRef, static: true })\r\n container!: ViewContainerRef;\r\n\r\n ngOnInit() {\r\n const component = Component({\r\n template: \"test no\",\r\n styles: [\":host {color: red; padding-left: 8px; display:block; }\"],\r\n })(class {});\r\n this.container.createComponent(component);\r\n }\r\n}\r\n```\r\n\r\nWith `aot: false`, we get an error : `The component '' needs to be compiled using the JIT compiler, but '@angular/compiler' is not available.` at runtime. \r\n\r\n**BUT**:\r\nThe error does not happen **IF** `platformBrowserDynamic().bootstrapModule({} as any)` is present in [main.ts](https://github.com/JeanMeche/angular-change-detection/blob/broken-standalone/src/main.ts) (but not called), everything works fine.\r\n\r\n\r\n\r\n### Please provide a link to a minimal reproduction of the bug\r\n\r\nhttps://github.com/JeanMeche/angular-change-detection/tree/broken-standalone\r\n\r\n\r\n### Please provide the environment you discovered this bug in (run `ng version`)\r\n\r\n```true\r\nAngular 14.2.9\r\n```","author":{"url":"https://github.com/JeanMeche","@type":"Person","name":"JeanMeche"},"datePublished":"2022-11-08T19:29:21Z","url":"https://github.com/angular/angular/issues/47996"}
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:e1b5b224-c9d0-bb43-b658-e1f9a30a9ab9 current-catalog-service-hash 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 request-id A3DA:134361:12D3BD5:18D2C80:6B011A01 html-safe-nonce c9dfb210df126ae5b70d9d73f84ffdf01f1e6fad2243615b88f46b9a6d81d949 visitor-payload eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBM0RBOjEzNDM2MToxMkQzQkQ1OjE4RDJDODA6NkIwMTFBMDEiLCJ2aXNpdG9yX2lkIjoiNzY3NzU2Njc3Mjg0ODk1Nzk1MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 visitor-hmac 27b944164ef66d40c0768f66585b510b3c635c45c7b3458acda5396accc26aa4 hovercard-subject-tag issue:1440783196 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/47996/issue_layout twitter:image https://opengraph.githubassets.com/60d097a70392d0b2f9a841ee720e679ccc149ad8eb373462dcbf4d9819f837f2/angular/angular/issues/47996 twitter:card summary_large_image og:image https://opengraph.githubassets.com/60d097a70392d0b2f9a841ee720e679ccc149ad8eb373462dcbf4d9819f837f2/angular/angular/issues/47996 og:image:alt Which @angular/* package(s) are the source of the bug? compiler Is this a regression? No Description Suppose this single standalone component with a dynamic component inside : @Component({ selector... og:image:width 1200 og:image:height 600 og:site_name GitHub og:type object og:author:username JeanMeche 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
URLs of crawlers that visited me.