MCPcopy Index your code
hub / github.com/angular/angular / constructor

Method constructor

modules/playground/src/hello_world/main.ts:27–29  ·  view source on GitHub ↗
(el: ElementRef, renderer: Renderer2)

Source from the content-addressed store, hash-verified

25 // ElementRef is always injectable and it wraps the element on which the
26 // directive was found by the compiler.
27 constructor(el: ElementRef, renderer: Renderer2) {
28 renderer.setStyle(el.nativeElement, 'color', 'red');
29 }
30}
31
32// Angular supports 2 basic types of directives:

Callers

nothing calls this directly

Calls 1

setStyleMethod · 0.65

Tested by

no test coverage detected