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

Method toggleM3

src/dev-app/dev-app/dev-app-layout.ts:223–236  ·  view source on GitHub ↗
(value = !this.state.m3Enabled)

Source from the content-addressed store, hash-verified

221 }
222
223 toggleM3(value = !this.state.m3Enabled) {
224 // We need to diff this one since it's a bit more expensive to toggle.
225 if (value !== this.state.m3Enabled) {
226 (document.getElementById('theme-styles') as HTMLLinkElement).href = value
227 ? 'theme-m3.css'
228 : 'theme.css';
229 }
230
231 this._iconRegistry.setDefaultFontSetClass(
232 value ? 'material-symbols-outlined' : 'material-icons',
233 );
234 this.state.m3Enabled = value;
235 setAppState(this.state);
236 }
237
238 toggleColorApiBackCompat(value = !this.state.colorApiBackCompat) {
239 this.state.colorApiBackCompat = value;

Callers 1

constructorMethod · 0.95

Calls 2

setAppStateFunction · 0.90

Tested by

no test coverage detected