( prop: string, value: any | NO_CHANGE, suffix: string | undefined | null, isClassBased: boolean, )
| 207 | * @param isClassBased `true` if `class` change (`false` if `style`) |
| 208 | */ |
| 209 | export function checkStylingProperty( |
| 210 | prop: string, |
| 211 | value: any | NO_CHANGE, |
| 212 | suffix: string | undefined | null, |
| 213 | isClassBased: boolean, |
| 214 | ): void { |
| 215 | const lView = getLView(); |
| 216 | const tView = getTView(); |
| 217 | // Styling instructions use 2 slots per binding. |
| 218 | // 1. one for the value / TStylingKey |
| 219 | // 2. one for the intermittent-value / TStylingRange |
| 220 | const bindingIndex = incrementBindingIndex(2); |
| 221 | if (tView.firstUpdatePass) { |
| 222 | stylingFirstUpdatePass(tView, prop, bindingIndex, isClassBased); |
| 223 | } |
| 224 | if (value !== NO_CHANGE && bindingUpdated(lView, bindingIndex, value)) { |
| 225 | if (ngDevMode && !isClassBased) { |
| 226 | warnInvalidStylePropValue(prop, value); |
| 227 | } |
| 228 | const tNode = tView.data[getSelectedIndex()] as TNode; |
| 229 | updateStyling( |
| 230 | tView, |
| 231 | tNode, |
| 232 | lView, |
| 233 | lView[RENDERER], |
| 234 | prop, |
| 235 | (lView[bindingIndex + 1] = normalizeSuffix(value, suffix)), |
| 236 | isClassBased, |
| 237 | bindingIndex, |
| 238 | ); |
| 239 | } |
| 240 | } |
| 241 | |
| 242 | function warnInvalidStylePropValue(prop: string, value: unknown): void { |
| 243 | if ( |
no test coverage detected