路由器插座不是多模块应用程序中的已知元素

问题描述

以下是我的代码错误是路由器元素不是已知元素。附上代码截图:

应用路由模块

enter image description here

应用模块

enter image description here

应用组件.ts

enter image description here

应用组件.html

enter image description here

解决方法

您应该将 ProductCardComponentLoginComponent 导入到 app.module.ts 并添加 ProductCardComponentLoginComponentdeclarations:[]

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...