|
1 | 1 | /* eslint-disable no-underscore-dangle */ |
2 | | -import { |
3 | | - AfterViewInit, |
4 | | - Component, |
5 | | - ElementRef, |
6 | | - OnInit, |
7 | | - QueryList, |
8 | | - ViewChild |
9 | | -} from '@angular/core'; |
| 2 | +import { AfterViewInit, Component, ElementRef, OnInit, QueryList, ViewChild, inject } from '@angular/core'; |
10 | 3 | import { ActivatedRoute } from '@angular/router'; |
11 | 4 | import { CloseScrollStrategy, ConnectedPositioningStrategy, HorizontalAlignment, IColumnExportingEventArgs, IgxColumnComponent, IgxCsvExporterService, IgxDateSummaryOperand, IgxExcelExporterService, IgxGridComponent, IgxNumberSummaryOperand, IgxSummaryResult, IgxToggleDirective, OverlaySettings, PositionSettings, VerticalAlignment, CellType, GridSelectionMode, IgxGridToolbarComponent, IgxGridToolbarActionsComponent, IgxGridToolbarHidingComponent, IgxGridToolbarPinningComponent, IgxGridToolbarExporterComponent, IgxGridToolbarTitleComponent, IgxInputGroupComponent, IgxPrefixDirective, IgxIconComponent, IgxInputDirective, IgxSuffixDirective, IgxIconButtonDirective, IgxRippleDirective, IgxCellTemplateDirective, IgxAvatarComponent, IgxLinearProgressBarComponent } from 'igniteui-angular'; |
12 | 5 | import { data, Employee } from './data'; |
@@ -78,6 +71,10 @@ class SoonSummary extends IgxDateSummaryOperand { |
78 | 71 | imports: [NgClass, IgxGridComponent, IgxPreventDocumentScrollDirective, IgxGridToolbarComponent, IgxGridToolbarActionsComponent, IgxGridToolbarHidingComponent, IgxGridToolbarPinningComponent, IgxGridToolbarExporterComponent, IgxGridToolbarTitleComponent, IgxInputGroupComponent, IgxPrefixDirective, IgxIconComponent, FormsModule, IgxInputDirective, IgxSuffixDirective, IgxIconButtonDirective, IgxRippleDirective, IgxColumnComponent, IgxCellTemplateDirective, IgxAvatarComponent, IgxLinearProgressBarComponent] |
79 | 72 | }) |
80 | 73 | export class GridCRMComponent implements OnInit, AfterViewInit { |
| 74 | + private csvExporter = inject(IgxCsvExporterService); |
| 75 | + private excelExporter = inject(IgxExcelExporterService); |
| 76 | + private activatedRoute = inject(ActivatedRoute); |
| 77 | + |
81 | 78 |
|
82 | 79 | @ViewChild('grid1', { read: IgxGridComponent, static: true }) |
83 | 80 | public grid1!: IgxGridComponent; |
@@ -117,10 +114,7 @@ export class GridCRMComponent implements OnInit, AfterViewInit { |
117 | 114 | scrollStrategy: new CloseScrollStrategy() |
118 | 115 | }; |
119 | 116 |
|
120 | | - constructor( |
121 | | - private csvExporter: IgxCsvExporterService, |
122 | | - private excelExporter: IgxExcelExporterService, |
123 | | - private activatedRoute: ActivatedRoute) { |
| 117 | + constructor() { |
124 | 118 |
|
125 | 119 | const exporterCb = (args: IColumnExportingEventArgs) => { |
126 | 120 | if (args.field === 'Deals') { args.cancel = true; } |
|
0 commit comments