MCPcopy Index your code
hub / github.com/angular/components / toggleDirection

Method toggleDirection

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

Source from the content-addressed store, hash-verified

213 }
214
215 toggleDirection(value: Direction = this.state.direction === 'ltr' ? 'rtl' : 'ltr') {
216 if (value !== this._dir.value) {
217 this._dir.value = this.state.direction = value;
218 this._changeDetectorRef.markForCheck();
219 setAppState(this.state);
220 }
221 }
222
223 toggleM3(value = !this.state.m3Enabled) {
224 // 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