如何解决ng-lottie和ngx-lottie在ionic-5中不起作用
我正在将抽奖式启动动画集成到ionic 5框架中的组件中。
我已经使用npm install --save ng-lottie
安装了ng-lottie,并按照文档https://www.npmjs.com/package/ng-lottie中的步骤进行操作。但是,它显示以下错误。请帮助我解决此问题。
Uncaught Error: Template parse errors:
Can't bind to 'options' since it isn't a known property of 'lottie-animation-view'.
1. If 'lottie-animation-view' is an Angular component and it has 'options' input,then verify that it is part of this module.
2. If 'lottie-animation-view' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("
<lottie-animation-view
[ERROR ->][options]="lottieConfig"
[width]="300"
[height]="600"
"): ng:///SsoModule/SsoComponent.html@13:20
Can't bind to 'width' since it isn't a known property of 'lottie-animation-view'.
解决方法
当您在app.module.ts中而不是在module.ts中添加依赖项时,此错误很常见。 尝试改变依赖性。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。