2016-06-12 18:41:33 -04:00
|
|
|
/* tslint:disable:no-unused-variable */
|
2015-11-19 19:59:22 -05:00
|
|
|
// #docregion
|
2016-08-22 05:35:22 -04:00
|
|
|
import { Directive, ElementRef, Input, Renderer } from '@angular/core';
|
2015-11-19 19:59:22 -05:00
|
|
|
|
2016-05-06 10:42:01 -04:00
|
|
|
@Directive({ selector: '[myHighlight]' })
|
2015-12-16 22:38:07 -05:00
|
|
|
export class HighlightDirective {
|
2016-08-22 05:35:22 -04:00
|
|
|
constructor(el: ElementRef, renderer: Renderer) {
|
|
|
|
renderer.setElementStyle(el.nativeElement, 'backgroundColor', 'yellow');
|
2015-11-19 19:59:22 -05:00
|
|
|
}
|
|
|
|
}
|