Title: Ivy: Component's class and attribute selectors are missing in created html element when router outlet is used · Issue #35445 · angular/angular · GitHub
Open Graph Title: Ivy: Component's class and attribute selectors are missing in created html element when router outlet is used · Issue #35445 · angular/angular
X Title: Ivy: Component's class and attribute selectors are missing in created html element when router outlet is used · Issue #35445 · angular/angular
Description: 🐞 bug report Affected Package Ivy Description If component has class or attribute selectors they are removed when component is created via routing. Component: import { Component } from "@angular/core"; @Component({ selector: "my-componen...
Open Graph Description: 🐞 bug report Affected Package Ivy Description If component has class or attribute selectors they are removed when component is created via routing. Component: import { Component } from "@angular/co...
X Description: 🐞 bug report Affected Package Ivy Description If component has class or attribute selectors they are removed when component is created via routing. Component: import { Component } from "@angul...
Opengraph URL: https://github.com/angular/angular/issues/35445
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Ivy: Component's class and attribute selectors are missing in created html element when router outlet is used","articleBody":"# 🐞 bug report\r\n\r\n### Affected Package\r\nIvy\r\n\r\n### Description\r\nIf component has class or attribute selectors they are removed when component is created via routing.\r\n\r\nComponent:\r\n```typescript\r\nimport { Component } from \"@angular/core\";\r\n\r\n@Component({\r\n selector: \"my-component.main[test]\",\r\n template: \"My component\"\r\n})\r\nexport class MyComponent {\r\n}\r\n```\r\n\r\nWhen it's used in another template like this:\r\n```html\r\n\u003cmy-component class=\"main\" [test]>\u003c/my-component>\r\n```\r\nthen it's created as expected.\r\n```html\r\n\u003cmy-component class=\"main\" test>My component\u003c/my-component>\r\n```\r\n\r\nWhen it's created via routing in router-outlet, then class and attribute are missing in resulted html:\r\n```html\r\n\u003cmy-component>My component\u003c/my-component>\r\n```\r\n\r\nThere is no such problem when Ivy is not enabled.\r\n\r\n## 🔬 Minimal Reproduction\r\n\r\nhttps://stackblitz.com/edit/angular-v2cpwe\r\n\r\n## 🌍 Your Environment\r\n\r\n**Angular Version:**\r\n\u003cpre>\u003ccode>\r\nAngular CLI: 9.0.2\r\nNode: 12.14.1\r\nOS: win32 x64\r\n\r\nAngular: 9.0.1\r\n... animations, common, compiler, compiler-cli, core, forms\r\n... language-service, platform-browser, platform-browser-dynamic\r\n... router\r\nIvy Workspace: Yes\r\n\r\nPackage Version\r\n------------------------------------------------------------\r\n@angular-devkit/architect 0.900.2\r\n@angular-devkit/build-angular 0.900.2\r\n@angular-devkit/build-ng-packagr 0.900.2\r\n@angular-devkit/build-optimizer 0.900.2\r\n@angular-devkit/build-webpack 0.900.2\r\n@angular-devkit/core 9.0.2\r\n@angular-devkit/schematics 9.0.2\r\n@angular/cli 9.0.2\r\n@ngtools/webpack 9.0.2\r\n@schematics/angular 9.0.2\r\n@schematics/update 0.900.2\r\nng-packagr 9.0.0\r\nrxjs 6.5.4\r\ntypescript 3.7.5\r\nwebpack 4.41.2\r\n\u003c/code>\u003c/pre>","author":{"url":"https://github.com/yurikolesnikov","@type":"Person","name":"yurikolesnikov"},"datePublished":"2020-02-14T12:20:17Z","url":"https://github.com/angular/angular/issues/35445"}
| 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:e2aa5ba6-e85c-5524-de01-4da695ac1c84 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9506:21AC3F:1CF55DF:24A45A1:6B014019 |
| html-safe-nonce | 5ca6fae27aa2ac56b9d740e066d68ff53a4cbf8269833770f150cd0099c05ed9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NTA2OjIxQUMzRjoxQ0Y1NURGOjI0QTQ1QTE6NkIwMTQwMTkiLCJ2aXNpdG9yX2lkIjoiNzU2Mjk4MDUwNzEzNTMyODI4MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 57922adc27eef5c8cae9da32e93c74e70f5786f9ed0bef8c2948703a871a0322 |
| hovercard-subject-tag | issue:565294276 |
| 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/35445/issue_layout |
| twitter:image | https://opengraph.githubassets.com/41a5c52d5b0685569c5711219687e63b3b26016be47f12229eb90fc6de6e0412/angular/angular/issues/35445 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/41a5c52d5b0685569c5711219687e63b3b26016be47f12229eb90fc6de6e0412/angular/angular/issues/35445 |
| og:image:alt | 🐞 bug report Affected Package Ivy Description If component has class or attribute selectors they are removed when component is created via routing. Component: import { Component } from "@angular/co... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | yurikolesnikov |
| 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