MCPcopy Create free account
hub / github.com/angular/angular / getJitChangeDetectionDefaultForVersion

Function getJitChangeDetectionDefaultForVersion

packages/compiler/src/util.ts:152–160  ·  view source on GitHub ↗
(version: string)

Source from the content-addressed store, hash-verified

150}
151
152export function getJitChangeDetectionDefaultForVersion(version: string): ChangeDetectionStrategy {
153 if (V1_TO_21.test(version)) {
154 // Angular v2 - v21 default is false.
155 return ChangeDetectionStrategy.Eager;
156 }
157
158 // All other Angular versions (v22+) default to true.
159 return ChangeDetectionStrategy.OnPush;
160}
161
162/**
163 * Namespaces a CSS variable name and validates its syntax.

Callers 2

util_spec.tsFile · 0.90

Calls 1

testMethod · 0.45

Tested by

no test coverage detected