ngx-lottie
Version:
<h1 align="center"> <img src="https://raw.githubusercontent.com/ngx-lottie/ngx-lottie/master/docs/assets/lottie.gif"> </h1>
23 lines • 875 B
JavaScript
import { Directive, Inject, Self, ElementRef, PLATFORM_ID, NgZone, } from '@angular/core';
import { BaseDirective } from './base.directive';
import { AnimationLoader } from './animation-loader';
export class LottieDirective extends BaseDirective {
constructor(ngZone, platformId, host, animationLoader) {
super(ngZone, platformId, animationLoader);
this.host = host;
}
ngOnChanges(changes) {
super.loadAnimation(changes, this.host.nativeElement);
}
}
LottieDirective.decorators = [
{ type: Directive, args: [{ selector: '[lottie]' },] }
];
/** @nocollapse */
LottieDirective.ctorParameters = () => [
{ type: NgZone },
{ type: String, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] },
{ type: ElementRef, decorators: [{ type: Self }] },
{ type: AnimationLoader }
];
//# sourceMappingURL=lottie.directive.js.map