File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed
packages/telemetry/src/angular Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ export * from '../public-types';
3434 * This should be provided in your application's root module.
3535 *
3636 * @example
37+ * Basic usage:
3738 * ```typescript
3839 * import { ErrorHandler } from '@angular/core';
3940 * import { FirebaseErrorHandler } from '@firebase/telemetry-angular';
@@ -48,7 +49,27 @@ export * from '../public-types';
4849 * export class AppModule { }
4950 * ```
5051 *
51- * @param telemetryOptions - {@link TelemetryOptions} that configure the Telemetry instance.
52+ * @example
53+ * Providing telemetry options:
54+ * ```typescript
55+ * import { ErrorHandler } from '@angular/core';
56+ * import { FirebaseErrorHandler } from '@firebase/telemetry-angular';
57+ *
58+ * @NgModule ({
59+ * // ...
60+ * providers: [
61+ * {
62+ * provide: ErrorHandler,
63+ * useFactory: () => new FirebaseErrorHandler({ appVersion: '1.2.3' })
64+ * }
65+ * ],
66+ * // ...
67+ * })
68+ * export class AppModule { }
69+ * ```
70+ *
71+ * @param telemetryOptions - Optional. {@link TelemetryOptions} that configure the Telemetry instance.
72+ * To provide these options, you must use a `useFactory` provider as shown in the example above.
5273 *
5374 * @public
5475 */
You can’t perform that action at this time.
0 commit comments