0
0
JRJose Romero
In this example, the @Directive annotation is used to declare a class named NameDirective. The constructor of this class will be automatically invoked when the selector is invoked.
Library: angular
Shortcut: angular.directive
import { Directive } from '@angular/core';
@Directive({ selector: '[selector-name]' })
export class NameDirective {
constructor() { }
}