| 
									
										
										
										
											2015-12-10 20:27:41 -08:00
										 |  |  | // #docregion
 | 
					
						
							| 
									
										
										
										
											2016-01-26 13:42:17 -08:00
										 |  |  | import {Directive, ElementRef, Input} from 'angular2/core'; | 
					
						
							| 
									
										
										
										
											2015-12-10 20:27:41 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  | @Directive({ | 
					
						
							|  |  |  |     selector: '[myHighlight]' | 
					
						
							|  |  |  | }) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-12-16 19:38:07 -08:00
										 |  |  | export class HighlightDirective { | 
					
						
							| 
									
										
										
										
											2016-01-26 13:42:17 -08:00
										 |  |  |     constructor(el: ElementRef) { | 
					
						
							|  |  |  |        el.nativeElement.style.backgroundColor = 'yellow'; | 
					
						
							| 
									
										
										
										
											2015-12-10 20:27:41 -08:00
										 |  |  |     } | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | // #enddocregion
 |