(el: ElementRef, renderer: Renderer2)
| 25 | // ElementRef is always injectable and it wraps the element on which the |
| 26 | // directive was found by the compiler. |
| 27 | constructor(el: ElementRef, renderer: Renderer2) { |
| 28 | renderer.setStyle(el.nativeElement, 'color', 'red'); |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | // Angular supports 2 basic types of directives: |