Hi, I’m trying to create an <lottie-animation-view>
in my component LoadingController.
I’m trying something like this…
- Constructor to define configurations of lottieConfig.
lottieConfig: any;
constructor(public loadingController: LoadingController) {
this.lottieConfig = {
path: 'assets/imgs/servishero_loading.json',
autoplay: true,
loop: true
}
- Call loader
ionViewDidLoad() {
this.loader = presentLoading();
}
- Prepare loader
presentLoading() {
let loader = this.loadingController.create({
spinner: 'hide',
content:
`
<div class="custom-spinner-container">
<lottie-animation-view [options]="lottieConfig" [width]="200" [height]="200"></lottie-animation-view>
</div>
`
});
loader.present();
return loader;
}
I was not successful with this.
All imports/module are OK.
Thank you for attention.