Why do I see component tags around component templates??
See original GitHub issueHi! Why do I see component tags around component templates?? As result my sidebar dropdown does not work! What cause this problem?
Angular CLI: 1.6.4
Node: 8.2.1
OS: win32 x64
Angular: 5.2.0
... animations, common, compiler, compiler-cli, core, forms
... http, platform-browser, platform-browser-dynamic
... platform-server, router
@angular/cli: 1.6.4
@angular-devkit/build-optimizer: 0.0.37
@angular-devkit/core: 0.0.24
@angular-devkit/schematics: 0.0.45
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.4
@schematics/angular: 0.1.12
typescript: 2.4.2
webpack: 3.10.0
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:15 (8 by maintainers)
Top Results From Across the Web
Render content between the component tags - Stack Overflow
I am surprised that this answer got so many upvotes as it shows non-working example. By looking here you will see that ng-content...
Read more >Using templates and slots - Web Components | MDN
Slots are identified by their name attribute, and allow you to define placeholders in your template that can be filled with any markup...
Read more >Introduction to components and templates - Angular
A component controls a patch of screen called a view. It consists of a TypeScript class, an HTML template, and a CSS style...
Read more >Self-closing component tags (<my-comp/> instead of ... - GitHub
The template compiler goes through the template and does a check for each present element to see if it matches with a selector...
Read more >Components Basics - Vue.js
This is because Vue's template parser respects /> as an indication to end any tag, regardless of its type. In DOM templates, however,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@kolkov … because they are custom components which have their own tags. If you use attribute components, directives or
<ng-container>
(<ng-template>
) then they would not be there.@kolkov … yes, there are some specific cases where you need to avoid of adding custom component tags to DOM (as for example
<TABLE><TR><TD>
structures) … then so called attribute components take their roles (…<tr myAttributeComponent>...</tr>
). Also<ng-container>
(<ng-template>
) play important roles in many Angular abstraction constructs. You can also use fully programmatic way of creating components … many times combined with dynamic loading of so called lazy loaded modules …