In this section, we will discuss about Custom Directives to be used in components. Instead, it is directly using the element it is applied to. On va dynamiser tout cela alors …. The Syntax of AngularJS Directives . Angular 8 Directives. The directives are listed below −. Since version 2.0 Angular has three types of directives: The class is also imported from the file given below. Angular directives are used to extend the power of the HTML by giving it new syntax. Now, the browser will show the following. Ces expériences ont ainsi pu me faire accéder à des rôles d’architecte dans des projets d’envergure. There are three kinds of directives in Angular namely: Components - This is basically a directive with a template. Le texte est rouge certes, mais cela s'arrête là. The command to create the directive using the command line is −, This is how it appears in the command line. ngIf permet de supprimer ou de recréer l'élément courant suivant l'expression passée en paramètre. Much like you create controllers and services, you can create your own directives for AngularJS to use. Les directives structurelles telles que *ngIf, *ngFor et *ngSwitchCase sont toutes encadrées par un component qui se veut très proche de la balise HTML 5