Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
13 lines (9 sloc) 262 Bytes
import { Directive, ElementRef, Renderer } from '@angular/core';
@Directive({
selector: '[redFont]'
})
export class RedFontDirective {
constructor(el: ElementRef, renderer: Renderer) {
renderer.setElementStyle(el.nativeElement, 'color', 'red');
}
}