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

Method constructor

src/material/tabs/tab-group.ts:292–316  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

290 protected _isServer: boolean = !inject(Platform).isBrowser;
291
292 constructor() {
293 const defaultConfig = inject<MatTabsConfig>(MAT_TABS_CONFIG, {optional: true});
294
295 this._groupId = inject(_IdGenerator).getId('mat-tab-group-');
296 this.animationDuration =
297 defaultConfig && defaultConfig.animationDuration ? defaultConfig.animationDuration : '500ms';
298 this.disablePagination =
299 defaultConfig && defaultConfig.disablePagination != null
300 ? defaultConfig.disablePagination
301 : false;
302 this.dynamicHeight =
303 defaultConfig && defaultConfig.dynamicHeight != null ? defaultConfig.dynamicHeight : false;
304 if (defaultConfig?.contentTabIndex != null) {
305 this.contentTabIndex = defaultConfig.contentTabIndex;
306 }
307 this.preserveContent = !!defaultConfig?.preserveContent;
308 this.fitInkBarToContent =
309 defaultConfig && defaultConfig.fitInkBarToContent != null
310 ? defaultConfig.fitInkBarToContent
311 : false;
312 this.stretchTabs =
313 defaultConfig && defaultConfig.stretchTabs != null ? defaultConfig.stretchTabs : true;
314 this.alignTabs =
315 defaultConfig && defaultConfig.alignTabs != null ? defaultConfig.alignTabs : null;
316 }
317
318 /**
319 * After the content is checked, this component knows what tabs have been defined

Callers

nothing calls this directly

Calls 1

getIdMethod · 0.45

Tested by

no test coverage detected