MCPcopy Create free account
hub / github.com/angular/components / toggleDirection

Method toggleDirection

src/dev-app/dev-app/dev-app-layout.ts:214–220  ·  view source on GitHub ↗
(value: Direction = this.state.direction === 'ltr' ? 'rtl' : 'ltr')

Source from the content-addressed store, hash-verified

212 }
213
214 toggleDirection(value: Direction = this.state.direction === 'ltr' ? 'rtl' : 'ltr') {
215 if (value !== this._dir.value) {
216 this._dir.value = this.state.direction = value;
217 this._changeDetectorRef.markForCheck();
218 setAppState(this.state);
219 }
220 }
221
222 toggleM3(value = !this.state.m3Enabled) {
223 // We need to diff this one since it's a bit more expensive to toggle.

Callers 1

constructorMethod · 0.95

Calls 2

setAppStateFunction · 0.90
markForCheckMethod · 0.80

Tested by

no test coverage detected