When I use table element in Angular sometimes show me this error in the console of the browser
What's the problem?
How can I solve it?
angular HTML:
<table class="table table-striped table-hover table-bordered table-condensed ">
<thead>
<tr class="tr-bottom-color-orrange">
<th class="text-center">name</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let item of listItem">
<td class="text-left">
{{ item.name }}
</td>
</tr>
</tbody>
</table>
error:
ERROR Error: StaticInjectorError(AppModule)[TableDirective -> ColumnResizingService]:
StaticInjectorError(Platform: core)[TableDirective -> ColumnResizingService]:
NullInjectorError: No provider for ColumnResizingService!
at _NullInjector.get (core.js:1002)
at resolveToken (core.js:1300)
at tryResolveToken (core.js:1242)
at StaticInjector.get (core.js:1110)
at resolveToken (core.js:1300)
at tryResolveToken (core.js:1242)
at StaticInjector.get (core.js:1110)
at resolveNgModuleDep (core.js:10854)
at NgModuleRef_.get (core.js:12087)
at resolveNgModuleDep (core.js:10854)
I'm using lazy loading module ContractModule :
@NgModule({
imports: [
SharedModule,
KendoSharedModule,
SmartadminModule,
SmartadminValidationModule,
PaginationModule.forRoot(),
DpDatePickerModule,
NgxMaskModule.forRoot(),
SmartadminWizardsModule,
ContractRoutingModule,
],
providers: [ContractResolverService],
declarations: [AddContractComponent, ListContractComponent, AddWarrantyComponent]
})
export class ContractModule { }
Was facing the same issue and found it was caused by importing the 'SharedModule' from Kendo.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With