ngx-lottie
Version:
<h1 align="center"> <img src="https://raw.githubusercontent.com/ngx-lottie/ngx-lottie/master/docs/assets/lottie.gif"> </h1>
27 lines • 922 B
JavaScript
import { NgModule, InjectionToken, APP_INITIALIZER } from '@angular/core';
import { TransferState } from '@angular/platform-browser';
import { appInitializerFactory } from './internals';
export const LOTTIE_SERVER_OPTIONS = new InjectionToken('LottieServerOptions');
export class LottieServerModule {
static forRoot(options) {
return {
ngModule: LottieServerModule,
providers: [
{
provide: LOTTIE_SERVER_OPTIONS,
useValue: options,
},
{
provide: APP_INITIALIZER,
useFactory: appInitializerFactory,
multi: true,
deps: [LOTTIE_SERVER_OPTIONS, TransferState],
},
],
};
}
}
LottieServerModule.decorators = [
{ type: NgModule }
];
//# sourceMappingURL=lottie-server.module.js.map