Skip to main content

providePacerOptions

还没翻译译自英文(tanstack.com)本页 9 段都还没译

function providePacerOptions(options): Provider;

Defined in: provider/pacer-provider.ts:33

Provides default options for all Pacer utilities in the Angular application. Use this function when configuring your Angular application to set default options that will be used by all Pacer utilities throughout your app.

Parameters

options

PacerProviderOptions

Returns

Provider

Example

// In your app.config.ts (standalone)
export const appConfig: ApplicationConfig = {
  providers: [
    providePacerOptions({
      debouncer: { wait: 300 },
      throttler: { wait: 100 },
    }),
  ],
};

// Or in NgModule (module-based)
@NgModule({
  providers: [
    providePacerOptions({
      debouncer: { wait: 300 },
    }),
  ],
})
export class AppModule {}