Examples demonstrating issues with rigid CSS styles.
I turned the corner
I turned the corner and saw {{hero.name}}. I waved and continued on my way.
{{hero.name}} is
{{hero.name}} is , and {{trait}} .
hero.id
in the <span>
is caught by the p-span CSS:
Id: ({{hero.id}}) Name: {{hero.name}}
hero.id
in the <ng-container>
is unaffected by the p-span CSS:
hero.id
in the <template *ngIf> disappears:
Id: ({{hero.id}}) Name: {{hero.name}}
hero.id
in the <template [ngIf]>
is unaffected by the p-span CSS:
Id: ({{hero.id}}) Name: {{hero.name}}
Examples demonstrating issues with layout-sensitive elements such as <select> and <table>.
<select> with <span>
<select> with <ng-container>
Options with <ng-container>
Options with <span>
Directive | Type | Description |
---|---|---|
NgClass | A | Add or remove multiple CSS classes. |
xxx | S | div with *ngIf formats crazy. |
yyy | S | div with *ngIf formats crazy. |
NgFor | S | Repeat the template for each item in a list. |
NgIf | S | Add or remove DOM elements. |
NgStyle | A | Add or remove multiple style attributes. |
NgSwitch | S | Include in DOM if case matches the switch value. |
<ng-container>Inside ng-container</ng-container>
<ng-content>this is an Angular parse error</ng-content>
Demo of </ng-content>