Defines a Directive component.

Angular's structural directives are responsible for HTML layout. They shape or reshape the DOM's structure, typically by adding, removing, or manipulating elements. They can be:

ForEach - each occurrence of a source collection will generate an UI Component
If - the UI Component will be displayed If the source is true
Switch, SwitchCase, SwitchDefault - the UI Component will be displayed with the Switch options

For more information: Structural Directives


Angular templates support Control flow blocks that let you conditionally show, hide, and repeat elements. They can be:

NewFor, NewEmpty - the @for block loops through a collection and repeatedly renders the UI Component, use @empty block for fallback
NewIf, NewElseIf, NewElse - the UI Component will be displayed if the source is true, use @elseif @else to display alternative content
NewSwitch, NewSwitchCase, NewSwitchDefault - the UI Component will be displayed with the @switch options @case, @default

For more information: Control flow blocks

Name Description
Comment Describes the object comment to include in the documentation report. <p>This property generally contains an explanation about the object.</p>
Directive type Defines the directive type.
Is active Defines whether the component is active.
Tag name Defines the HTML element’s tag name.
Directive expression Defines a directive condition or expression.
Directive source Defines the directive source.
ForEach index Defines the ForEach index name. <p>Use TS scope.indexName to access its value in other components.</p>
ForEach item Defines the ForEach item name. <p>Use TS scope.itemName to access its value in other components.</p>