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

Method constructor

src/material/paginator/paginator.ts:201–230  ·  view source on GitHub ↗

Inserted by Angular inject() migration for backwards compatibility

()

Source from the content-addressed store, hash-verified

199
200 /** Inserted by Angular inject() migration for backwards compatibility */
201 constructor() {
202 const _intl = this._intl;
203 const defaults = inject<MatPaginatorDefaultOptions>(MAT_PAGINATOR_DEFAULT_OPTIONS, {
204 optional: true,
205 });
206
207 this._intlChanges = _intl.changes.subscribe(() => this._changeDetectorRef.markForCheck());
208
209 if (defaults) {
210 const {pageSize, pageSizeOptions, hidePageSize, showFirstLastButtons} = defaults;
211
212 if (pageSize != null) {
213 this._pageSize = pageSize;
214 }
215
216 if (pageSizeOptions != null) {
217 this._pageSizeOptions = pageSizeOptions;
218 }
219
220 if (hidePageSize != null) {
221 this.hidePageSize = hidePageSize;
222 }
223
224 if (showFirstLastButtons != null) {
225 this.showFirstLastButtons = showFirstLastButtons;
226 }
227 }
228
229 this._formFieldAppearance = defaults?.formFieldAppearance || 'outline';
230 }
231
232 ngOnInit() {
233 this._isInitialized = true;

Callers

nothing calls this directly

Calls 1

markForCheckMethod · 0.80

Tested by

no test coverage detected