More talks in the program:
10:30 - 11:30
Structural directives are a powerful feature in Angular that allows us to dynamically change a component view structure. As with directives, a structural directive is used as an attribute on an element in the component template and the logic is implemented in the directive’s controller class. An asterisk denotes a structural directive and is the fairy dust for the magic that happens behind the scenes. Angular has a DSL (microsyntax) for the string assigned to a structural directive that allows us to interact with the directive in a natural and expressive language. In this talk, we will look at “<ng-template>”, “TemplateRef”, view containers, and “ViewContainterRef”, the building blocks of structural directives. We will also look at the microsyntax and have a go at creating custom structural directives.