(version: string)
| 150 | } |
| 151 | |
| 152 | export 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. |
no test coverage detected