Angular 从Github存储库导入角度组件-找不到模块或其相应的类型声明
我想将一个角度组件从GitHub上的一个项目/模块导入另一个项目/模块。这里是到测试模块的链接:带有测试组件。我在本地创建了另一个Angular项目并运行Angular 从Github存储库导入角度组件-找不到模块或其相应的类型声明,angular,github,npm,angular-components,angular-module,Angular,Github,Npm,Angular Components,Angular Module,我想将一个角度组件从GitHub上的一个项目/模块导入另一个项目/模块。这里是到测试模块的链接:带有测试组件。我在本地创建了另一个Angular项目并运行 npm install --save https://github.com/tilo-ai/test-mod test mod已添加到package.json中: "dependencies": { "test-mod": "git+https://github.com/tilo-ai/
npm install --save https://github.com/tilo-ai/test-mod
test mod已添加到package.json中:
"dependencies": {
"test-mod": "git+https://github.com/tilo-ai/test-mod.git",
},
我尝试使用导入app.module.ts中的TestCompComponent
import { TestCompComponent } from 'test-mod';
但我得到了一个错误:
Cannot find module 'test-mod' or its corresponding type declarations.
有人知道缺少什么吗?如果编辑器中出现错误,请尝试此解决方案。
我认为发生错误是因为我仍然缺少一般的东西。例如,我没有类型文件。我刚刚用ng new my project创建了一个角度项目。