MCPcopy
hub / github.com/angular/components / constructor

Method constructor

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

Source from the content-addressed store, hash-verified

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