Skip to main content

One doc tagged with "ngContainer"

View All Tags

ngContainer

ng-container is a special Angular element that acts as a grouping element for structural directives but doesn't interfere with styles or layout because Angular doesn't put it in the DOM. This element is particularly useful for cases where you want to apply a structural directive (like ngIf, ngFor, ngSwitch) but don't want to add an extra element to the DOM, which might disrupt your layout or styling.