Title: ng-content component in router-outlet · Issue #12447 · angular/angular · GitHub
Open Graph Title: ng-content component in router-outlet · Issue #12447 · angular/angular
X Title: ng-content component in router-outlet · Issue #12447 · angular/angular
Description: [x ] bug report => search github for a similar issue or PR before submitting [ ] feature request [ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md...
Open Graph Description: [x ] bug report => search github for a similar issue or PR before submitting [ ] feature request [ ] support request => Please do not submit support request here, instead see https://github.com/ang...
X Description: [x ] bug report => search github for a similar issue or PR before submitting [ ] feature request [ ] support request => Please do not submit support request here, instead see https://github.c...
Opengraph URL: https://github.com/angular/angular/issues/12447
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ng-content component in router-outlet","articleBody":"\u003c!--\nIF YOU DON'T FILL OUT THE FOLLOWING INFORMATION WE MIGHT CLOSE YOUR ISSUE WITHOUT INVESTIGATING\n-->\n\n```\n[x ] bug report => search github for a similar issue or PR before submitting\n[ ] feature request\n[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question\n```\n\n**Current behavior**\n\n\u003c!-- Describe how the bug manifests. -->\n\nI have a router-outlet inside a component like this\n\n```\n\u003capp-leftnavbar>\n \u003crouter-outlet>\u003c/router-outlet>\n\u003c/app-leftnavbar>\n```\n\nWhat I want to do is use `\u003cng-content select=\".something\">` inside app-leftnavbar in order to split the html of the loaded component into the router in two things, but no matter how I try, ng-content select doesnt work inside. But if I leave it without selectors it displays the content properly (the whole component (not-split of course)). Even if its a normal component and not a router-outlet its the same problem\n\n**Expected behavior**\n\n\u003c!-- Describe what the behavior would be without the bug. -->\n\nI should be able to use \u003cng-content select=\"\"> since the loaded component into the router-outlet will be transformed to html.. and since normal \u003cng-content> (without select) works, I expect to be able to select as well.\n\n**Minimal reproduction of the problem with instructions**\n\n\u003c!--\nIf the current behavior is a bug or you can illustrate your feature request better with an example, \nplease provide the *STEPS TO REPRODUCE* and if possible a *MINIMAL DEMO* of the problem via\nhttps://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5).\n-->\n\nCreate an angular component inside of another component and try to use `\u003cng-content select=\".something\">` in on the parent\n\n```\n\u003cparent>\n \u003cchild>\u003c/child>\n\u003c/parent>\n```\n\nand inside parent use\n\n```\n\u003cng-content select=\".something\">\u003c/ng-content>\n```\n\nand\n\n```\n\u003cng-content select=\".somethingelse\">\u003c/ng-content>\n```\n\nand nothing will be shown. (Of course I have defined elements with the appropriate classes in `child`),\n\nIf used without selecting (just `\u003cng-content>\u003c/ng-content>` the component will be shown normally\n\n**Please tell us about your environment:**\n\n\u003c!-- Operating system, IDE, package manager, HTTP server, ... -->\n- **Angular version:** 2.0.0","author":{"url":"https://github.com/denkomanceski","@type":"Person","name":"denkomanceski"},"datePublished":"2016-10-21T20:50:40Z","url":"https://github.com/angular/angular/issues/12447"}
| 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:7f708215-3b06-6da3-77d9-b92ac1cd40cf |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BB32:29AEE8:1794767:1F62BD1:6B0142AC |
| html-safe-nonce | e341f5a949a99725cafa1212b6d12d68760b1f6eaa63d4f0244c6b95148df666 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQjMyOjI5QUVFODoxNzk0NzY3OjFGNjJCRDE6NkIwMTQyQUMiLCJ2aXNpdG9yX2lkIjoiNTAyNjA5MDcxMTQ4NTg1ODQ3NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3ad3cc1ee35610f9b3642640d16c01efd6d4d1b93d54eca08ebd9bf9abb3a885 |
| hovercard-subject-tag | issue:184566580 |
| 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/12447/issue_layout |
| twitter:image | https://opengraph.githubassets.com/25bfe7d07decf0fe028ebce9b0a1e6756c93f9b57b553b978129c583003a4907/angular/angular/issues/12447 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/25bfe7d07decf0fe028ebce9b0a1e6756c93f9b57b553b978129c583003a4907/angular/angular/issues/12447 |
| og:image:alt | [x ] bug report => search github for a similar issue or PR before submitting [ ] feature request [ ] support request => Please do not submit support request here, instead see https://github.com/ang... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | denkomanceski |
| 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