javascript - 如何在功能模块组件中使用material2-carousel
问题描述
我正在使用 Angular 7,并尝试使用材料轮播(https://github.com/gbrlsnchs/material2-carousel)。
我在我的功能模块中使用它时遇到问题。
1)我试图在主模块中导入它:
import { MatCarouselModule } from '@ngmodule/material-carousel';
@NgModule({
imports: [
MatCarouselModule.forRoot()
]
2)我尝试以与上述相同的方式将其导入到我的共享材料模块中,我在所有功能模块中都导入了该模块。
3)我尝试导入主模块和共享模块。
这三种解决方案中的任何一种都不起作用。
我总是得到错误:
ERROR Error: Uncaught (in promise): Error: Template parse errors:
'mat-carousel-slide' is not a known element:
1. If 'mat-carousel-slide' is an Angular component, then verify that it is part of this module.
2. If 'mat-carousel-slide' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("
</div>
<mat-carousel>
[ERROR ->]<mat-carousel-slide>
1
</mat-carousel-slide>
"): ng:///EditorModule/ImageDisplayComponent.html@41:
请问有什么建议吗?
解决方案
推荐阅读
- flutter - 颤动在桌面和网络中获取鼠标位置
- arduino - nodemcu esp8266 http请求返回-1“连接失败”
- python - 返回具有动态索引的嵌套字典或嵌套列表的值
- java - 如何使用 docker-java 获取容器的主机名?
- angular - 如何在 Angular 指令中选择具有特定类的元素的子元素?
- python - 从分组的熊猫系列中创建晶须图
- flutter - 有条件地向图像传递参数
- flutter - 无法检查用户帐户是否存在?
- fortran - 在fortran中打印和保存矩阵
- python - Django Rest Framework:在多部分/表单数据请求中序列化数组