Skip to main content
cngx-src documentation

provideEagerMaskPresets

Functionforms/inputv0.1.0

projects/forms/input/mask-presets/registry.ts

Description#

Eagerly loads the lazily code-split mask preset tables at application start, instead of on first use. Reach for it when the on-demand import() is a problem - chiefly offline / PWA apps that must have every mask pattern cached before connectivity drops, or to avoid the one-frame generic-fallback mask on first focus.

Pass specific keys to warm only the tables you ship; omit them to load all four. For strict offline-first apps, also list the emitted mask-presets-* chunks in your service-worker precache so the eager fetch is cached.

bootstrapApplication(App, {
  providers: [provideEagerMaskPresets()],            // all tables
});
// or: provideEagerMaskPresets('phone', 'date')      // only these

Signature#

provideEagerMaskPresets(...keys: undefined)

Parameters#

@paramkeys

Returns#

EnvironmentProviders