angular - 从角材料导入树组件
问题描述
我正在尝试导入树组件,即Tree with partially loaded data
从材料中导入。我已按照此示例stackblitz
我被这个错误困住了
ERROR Error: StaticInjectorError(AppModule)[ExistingOfferingsComponent->LoadmoreDatabase]:
StaticInjectorError(Platform: core)[ExistingOfferingsComponent -> LoadmoreDatabase]:
NullInjectorError: No provider for LoadmoreDatabase!
解决方案
您需要添加LoadmoreDatabase
到providers
您的ExistingOfferings
组件:
@Component({
selector: 'existing-offerings-component',
templateUrl: 'existing-offerings-component.html',
styleUrls: ['existing-offerings-component.css'],
providers: [LoadmoreDatabase]
})
export class ExistingOfferingsComponent{
...
}
推荐阅读
- java - 如何在内部 pojo 类上应用 javax 自定义验证?
- python - 如何将大列表细分为子列表并使用它们创建新列表
- cplex - 在解决方案池 Cplex 中保留唯一值
- mysql - JOOQ:使用 one2one 关系更新两个表
- c++ - 如何诠释。并且float会影响代码ex(1.3-1)* 10,为什么将该值存储在float中会在存储在int中时给出不同的值?
- android - Stripe Android - 扫描卡
- php - 如何使用 Laravel 的代理库?
- java - 当池大小为 1 时,ScheduledExecutorService 是否保证顺序?
- android - React Native Firebase - 一段时间后不会出现 Android 10 通知
- xml - Apache Camel XSLT:如何在导入中使用 xsl 模板?