()
| 123 | detection cycle. |
| 124 | */ |
| 125 | ngDoCheck(): void { |
| 126 | // classes from the [class] binding |
| 127 | for (const klass of this.initialClasses) { |
| 128 | this._updateState(klass, true); |
| 129 | } |
| 130 | |
| 131 | // classes from the [ngClass] binding |
| 132 | const rawClass = this.rawClass; |
| 133 | if (Array.isArray(rawClass) || rawClass instanceof Set) { |
| 134 | for (const klass of rawClass) { |
| 135 | this._updateState(klass, true); |
| 136 | } |
| 137 | } else if (rawClass != null) { |
| 138 | for (const klass of Object.keys(rawClass)) { |
| 139 | this._updateState(klass, Boolean(rawClass[klass])); |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | this._applyStateDiff(); |
| 144 | } |
| 145 | |
| 146 | private _updateState(klass: string, nextEnabled: boolean) { |
| 147 | const state = this.stateMap.get(klass); |
nothing calls this directly
no test coverage detected