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

Method constructor

src/dev-app/dev-app/dev-app-layout.ts:140–158  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

138 readonly isZoneless = this._ngZone instanceof ɵNoopNgZone;
139
140 constructor() {
141 this.testMode = this._route.queryParams.pipe(map(params => params['testonly'] === 'true'));
142 this.toggleTheme(this.state.darkTheme);
143 this.toggleSystemTheme(this.state.systemTheme);
144 this.toggleStrongFocus(this.state.strongFocusEnabled);
145 this.toggleDensity(Math.max(this._densityScales.indexOf(this.state.density), 0));
146 this.toggleRippleDisabled(this.state.rippleDisabled);
147 this.toggleDirection(this.state.direction);
148 this.toggleM3(this.state.m3Enabled);
149 this.toggleColorApiBackCompat(this.state.colorApiBackCompat);
150
151 this.testMode.subscribe(isTestOnly => {
152 if (isTestOnly) {
153 this.toggleM3(true);
154 this.toggleSystemTheme(true);
155 this._document.body.classList.add('demo-testonly-mode');
156 }
157 });
158 }
159
160 toggleTheme(value = !this.state.darkTheme) {
161 this.state.darkTheme = value;

Callers

nothing calls this directly

Calls 10

toggleThemeMethod · 0.95
toggleSystemThemeMethod · 0.95
toggleStrongFocusMethod · 0.95
toggleDensityMethod · 0.95
toggleRippleDisabledMethod · 0.95
toggleDirectionMethod · 0.95
toggleM3Method · 0.95
maxMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected