Title: class names are not retained when host is used with Component decorator · Issue #51460 · angular/angular · GitHub
Open Graph Title: class names are not retained when host is used with Component decorator · Issue #51460 · angular/angular
X Title: class names are not retained when host is used with Component decorator · Issue #51460 · angular/angular
Description: Which @angular/* package(s) are the source of the bug? core, elements Is this a regression? No Description Consider following example. @Component({ selector: 'my-app', template: ` Hello from {{name}}!
Hello from {{name}}!\u003c/h1>\r\n \u003ca target=\"_blank\" href=\"https://angular.io/start\">\r\n Learn more about Angular \r\n \u003c/a>\r\n `,\r\n host: {\r\n class: 'xyz',\r\n },\r\n});\r\n```\r\n\r\nwhen used as custom element like below\r\n\r\n```html\r\n\u003cmy-app-element class=\"abc\">\u003c/my-app-element>\r\n```\r\n\r\nThe `abc` class is removed and only `xyz` class is applied. \r\n\r\nExpected behavior would be to have both class applied on element whene rendered on DOM.\r\n\r\n \r\n\r\n\n\n### Please provide a link to a minimal reproduction of the bug\n\nhttps://stackblitz.com/edit/stackblitz-starters-qzdgyq?description=An%20angular-cli%20project%20based%20on%20@angular/animations,%20@angular/common,%20@angular/compiler,%20@angular/core,%20@angular/forms,%20@angular/platform-browser,%20@angular/platform-browser-dynamic,%20@angular/router,%20core-js,%20rxjs,%20tslib%20and%20zone.js&file=src%2Fmain.ts,src%2Findex.html&title=Angular%20Starter\n\n### Please provide the exception or error you saw\n\n_No response_\n\n### Please provide the environment you discovered this bug in (run `ng version`)\n\n```true\nAngular CLI: 16.1.5\r\nNode: 16.19.0\r\nPackage Manager: yarn 1.22.17\r\nOS: darwin arm64\r\n\r\nAngular: 16.1.5\r\n... animations, cdk, cli, common, compiler, compiler-cli, core\r\n... elements, forms, language-service, localize\r\n... platform-browser, platform-browser-dynamic, platform-server\r\n... router\r\n\r\nPackage Version\r\n---------------------------------------------------------\r\n@angular-devkit/architect 0.1601.5\r\n@angular-devkit/build-angular 16.1.5\r\n@angular-devkit/core 16.1.5\r\n@angular-devkit/schematics 16.1.5\r\n@schematics/angular 16.1.5\r\nng-packagr 16.1.0\r\nrxjs 6.6.7\r\ntypescript 4.9.5\r\nzone.js 0.13.1\n```\n\n\n### Anything else?\n\n_No response_","author":{"url":"https://github.com/chintankavathia","@type":"Person","name":"chintankavathia"},"datePublished":"2023-08-22T09:54:15Z","url":"https://github.com/angular/angular/issues/51460"}
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:f767ab5e-7d57-987e-ad1c-04f33dfdd391 current-catalog-service-hash 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 request-id B17A:2E3FEE:F668A8:138D9AA:6B010DDF html-safe-nonce bb79fb9bde6979d5a9d605f6079bdb9dceeef51ad80f05b1f32eed4381b895d7 visitor-payload eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMTdBOjJFM0ZFRTpGNjY4QTg6MTM4RDlBQTo2QjAxMERERiIsInZpc2l0b3JfaWQiOiI3MDM1MDM1MzM2MDQwMzIwNDc5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= visitor-hmac f4fd2c0320dbbc31e0654bdb0c72aff41f568c06e446de7332f574ef18e688e5 hovercard-subject-tag issue:1861091405 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/51460/issue_layout twitter:image https://opengraph.githubassets.com/2e6ba6c06556a702351f2af395c44908e2e8a7b83efa6e5e0d047726d6aec8c4/angular/angular/issues/51460 twitter:card summary_large_image og:image https://opengraph.githubassets.com/2e6ba6c06556a702351f2af395c44908e2e8a7b83efa6e5e0d047726d6aec8c4/angular/angular/issues/51460 og:image:alt Which @angular/* package(s) are the source of the bug? core, elements Is this a regression? No Description Consider following example. @Component({ selector: 'my-app', template: ` Hello from {{...
og:image:width 1200 og:image:height 600 og:site_name GitHub og:type object og:author:username chintankavathia 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 full theme-color #1e2327 color-scheme light dark react-app-name issues
Links:
Viewport: width=device-width