Open
Description
Angular recommends moving away from bootstrapModule
and instead using bootstrapComponent
. This means that the forRoot
and forChild
pattern will be obsolete. Here is the simple hack/wrapper function that I came up with while migrating my application to ng 18.
Please consider officially adding a provider function. You may use the code below for inspiration.
export const provideFingerprintjsPro = (clientOptions: FpjsClientOptions) => {
const FPJS_PROVIDERS = FingerprintjsProAngularModule.forRoot(clientOptions).providers as (
| Provider
| EnvironmentProviders
)[];
return FPJS_PROVIDERS;
};
Example usage
bootstrapApplication(AppComponent, {
providers: [
provideFingerprintjsPro({
// config goes here
})
]
})
Metadata
Metadata
Assignees
Labels
No labels