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

Method setStyle

adev/src/app/features/home/animation/animation.ts:374–390  ·  view source on GitHub ↗

Set active style.

(selector: string, property: string, value: CssPropertyValue)

Source from the content-addressed store, hash-verified

372
373 /** Set active style. */
374 private setStyle(selector: string, property: string, value: CssPropertyValue) {
375 const elements = this.allObjects.get(selector)!;
376
377 const valueString = stringifyParsedValue(value);
378
379 if (elements instanceof Element) {
380 this.renderer.setStyle(elements, property, valueString);
381 } else {
382 for (const e of elements) {
383 this.renderer.setStyle(e, property, valueString);
384 }
385 }
386
387 const activeStyles = this.activeStyles.get(selector) || {};
388 activeStyles[property] = value;
389 this.activeStyles.set(selector, activeStyles);
390 }
391
392 /** Remove active style. */
393 private removeStyle(selector: string, property: string) {

Callers 1

updateFrameMethod · 0.95

Calls 4

stringifyParsedValueFunction · 0.90
getMethod · 0.65
setStyleMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected