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

Method _updateView

packages/common/src/directives/ng_plural.ts:64–70  ·  view source on GitHub ↗
(switchValue: number)

Source from the content-addressed store, hash-verified

62 }
63
64 private _updateView(switchValue: number): void {
65 this._clearViews();
66
67 const cases = Object.keys(this._caseViews);
68 const key = getPluralCategory(switchValue, cases, this._localization);
69 this._activateView(this._caseViews[key]);
70 }
71
72 private _clearViews() {
73 if (this._activeView) this._activeView.destroy();

Callers 1

ngPluralMethod · 0.95

Calls 4

_clearViewsMethod · 0.95
_activateViewMethod · 0.95
getPluralCategoryFunction · 0.90
keysMethod · 0.65

Tested by

no test coverage detected