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

Method _updateState

packages/common/src/directives/ng_class.ts:146–157  ·  view source on GitHub ↗
(klass: string, nextEnabled: boolean)

Source from the content-addressed store, hash-verified

144 }
145
146 private _updateState(klass: string, nextEnabled: boolean) {
147 const state = this.stateMap.get(klass);
148 if (state !== undefined) {
149 if (state.enabled !== nextEnabled) {
150 state.changed = true;
151 state.enabled = nextEnabled;
152 }
153 state.touched = true;
154 } else {
155 this.stateMap.set(klass, {enabled: nextEnabled, changed: true, touched: true});
156 }
157 }
158
159 private _applyStateDiff() {
160 for (const stateEntry of this.stateMap) {

Callers 1

ngDoCheckMethod · 0.95

Calls 2

getMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected