AngularKendoGrid抛出NullInjectorError:NoproviderforColumnResizingService
创始人
2024-10-27 20:01:22
0

此错误是由于Angular Kendo Grid未在您的代码中引入ColumnResizingService服务所导致的。您可以使用以下代码示例来解决此问题:

在app.module.ts中,将ColumnResizingService添加到providers数组中:

import { ColumnResizingService } from '@progress/kendo-angular-grid';
@NgModule({
  imports: [ ... ],
  declarations: [ ... ],
  providers: [ ColumnResizingService ],
  bootstrap: [ AppComponent ]
})
export class AppModule { }

现在,您可以在Grid组件中使用ColumnResizingService服务了,例如:

import { Component } from '@angular/core';
import { GridComponent } from '@progress/kendo-angular-grid';
import { ColumnResizingService } from '@progress/kendo-angular-grid';
 
@Component({
  selector: 'my-app',
  template: `
    
      
      
      
      
      
      
    
  `
})
export class AppComponent {
  public gridData: any[] = sampleProducts;
  constructor(public resizingService: ColumnResizingService) { }
} 

请注意,我们在构造函数中注入了ColumnResizingService服务。现在,我们可以在应用程序中使用所有Grid特性了,包括列宽度调整。

相关内容

热门资讯

透视了解!WePoKe透明挂,... 透视了解!WePoKe透明挂,微扑克系统发牌规律,总是是真的有挂(详细辅助黑科技教程)1、微扑克系统...
透视辅助!wepoke有挂,i... 透视辅助!wepoke有挂,impoker有挂吗,其实是真的有挂(详细辅助力荐教程);1、进入游戏-...
透视能赢!德州ai辅助软件,用... 透视能赢!德州ai辅助软件,用ai外挂打德州有用吗,原来有挂(详细辅助详细教程)1、每一步都需要思考...
透视透视!wepoke插件,w... 透视透视!wepoke插件,wpk ai辅助,本来有挂(详细辅助AI教程);1、完成wpk ai辅助...
辅助透视!wepoke有辅助挂... 辅助透视!wepoke有辅助挂,德州ai软件使用,一贯是有挂(详细辅助微扑克教程)小薇(透视辅助)致...
透视好友!wpk透明挂,wpk... 透视好友!wpk透明挂,wpk数据工具,原来真的有挂(详细辅助安装教程)1、wpk透明挂透视辅助简单...
透视计算!aapoker辅助工... 透视计算!aapoker辅助工具,云扑克辅助器苹果,竟然存在有挂(详细辅助黑科技教程)1、aapok...
透视工具!wpk ai辅助,w... 透视工具!wpk ai辅助,wpk透视辅助测试,果然是有挂(详细辅助2025版教程)进入游戏-大厅左...
透视美元局!智星德州菠萝,wp... 透视美元局!智星德州菠萝,wpk系统发牌规律,确实是有挂(详细辅助wepoke教程)1、构建自己的智...
透视脚本!wepoke ai辅... 透视脚本!wepoke ai辅助,德州之星辅助透视,真是存在有挂(详细辅助总结教程);1、起透看视 ...