2015-11-19 19:59:22 -05:00
|
|
|
// #docregion
|
2015-12-10 23:27:41 -05:00
|
|
|
import {Directive, ElementRef, Renderer, Input} from 'angular2/core';
|
2015-11-19 19:59:22 -05:00
|
|
|
|
|
|
|
@Directive({
|
2015-12-10 23:27:41 -05:00
|
|
|
selector: '[myHighlight]'
|
2015-11-19 19:59:22 -05:00
|
|
|
})
|
|
|
|
|
|
|
|
export class Highlight {
|
|
|
|
constructor(el: ElementRef, renderer: Renderer) {
|
|
|
|
//el.nativeElement.style.backgroundColor = 'yellow';
|
2015-12-10 23:27:41 -05:00
|
|
|
renderer.setElementStyle(el, 'backgroundColor', 'yellow');
|
2015-11-19 19:59:22 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
// #enddocregion
|