Structural directives change the layout of the HTML document by adding and removing elements. They build on the core features available for attribute directives, described in Chapter 15 , with additional su
Structural directives change the layout of the HTML document by adding and removing elements. They build on the core features available for attribute directives, described in Chapter 15, with additional support for micro-templates, which are small fragments of contents defined within the templates used...
在 Angular 2 中,Directive 被明确划分成三种类型:Component,Attribute Directive 以及 Structural Directive(其中 Angular 1.x 也有这个划分,只是官方文档中没有明确提及)。其中,Structural Directive 虽然数量最少,却有着极高的重要性。 Directive plays an important part in both Angular 1.x and Angular 2, ...