Last active
May 22, 2017 15:16
-
-
Save wKoza/0a7a7f7e2c1dde7a9c80fd863c1a109e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Directive, Renderer2, ElementRef} from '@angular/core'; | |
@Directive({ | |
selector: '[appHighlight]' | |
}) | |
export class HighlightDirective { | |
constructor(el: ElementRef, renderer: Renderer2) { | |
renderer.setStyle(el.nativeElement, 'color', 'red'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment