If you wish to remove […] But unlike in this topic they were not trying to add styles to a directive. ng-model – The ng-model directive defines the model or variable to be used in AngularJS. Voici un exemple de template utilisant cette directive : Dans ce cas, il n'y a pas de modification de structure. In the above file, there is a class called ChangeTextDirective and a constructor, which takes the element of type ElementRef, which is mandatory. You can compare the building of directives with the building of components in Angular 2. A directive is a custom HTML element that is used to extend the power of HTML. Angular Directive: Structural Directives Structural directives are responsible for shape or reshape the DOM’s structure , typically by adding, removing, or manipulating elements. We use Angular Directives for making the static page that is an HTML page into a dynamic page. The class is also imported from the file given below. Dans la version 2 d'Angular, se nommait