directive to angular 4 code example
Example 1: angular directive output
// just use it normal
@Output() itch:EventEmitter<any> = new EventEmitter();
//and call in html
<div appCollar (itch)='scratch()' >
Example 2: user defined directives in angular 7
<p [ngStyle]="{`THE CSS YOPU WANT TO ADD`}"> I am an Attribute Directive</p>