Skip to content

Commit bd8fdc3

Browse files
committed
chore(grid-crm): add import for activated route support
1 parent f99745f commit bd8fdc3

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

live-editing/configs/GridCRMConfigGenerator.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
IgxAvatarModule,
1111
IgxInputGroupModule,
1212
IgxButtonModule } from 'igniteui-angular';
13+
import { RouterTestingModule } from "@angular/router/testing";
1314
import { Config, IConfigGenerator, AppModuleConfig } from 'igniteui-live-editing';
1415
import { BrowserModule, HammerModule } from '@angular/platform-browser';
1516
import { RouterModule } from '@angular/router';
@@ -37,12 +38,12 @@ export class GridCRMConfigGenerator implements IConfigGenerator {
3738
'RouterModule', 'HammerModule', 'IgxAutocompleteModule', 'IgxRippleModule',
3839
'IgxGridModule', 'IgxIconModule', 'IgxLayoutModule',
3940
'IgxAvatarModule', 'IgxInputGroupModule', 'IgxButtonModule',
40-
'IgxPreventDocumentScrollModule', 'GridCRMComponent'
41+
'IgxPreventDocumentScrollModule', 'GridCRMComponent', 'RouterTestingModule'
4142
],
4243
ngDeclarations: ['GridCRMComponent'],
4344
ngImports: ['IgxPreventDocumentScrollModule', 'IgxRippleModule',
4445
'IgxGridModule', 'IgxIconModule', 'IgxLayoutModule',
45-
'IgxAvatarModule', 'IgxInputGroupModule', 'IgxButtonModule']
46+
'IgxAvatarModule', 'IgxInputGroupModule', 'IgxButtonModule', 'RouterTestingModule']
4647
})
4748
}));
4849

projects/app-crm/src/app/grid-crm/grid-crm.component.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
QueryList,
88
ViewChild
99
} from '@angular/core';
10+
import { ActivatedRoute } from '@angular/router';
1011
import {
1112
CloseScrollStrategy,
1213
ConnectedPositioningStrategy,
@@ -132,7 +133,8 @@ export class GridCRMComponent implements OnInit, AfterViewInit {
132133

133134
constructor(
134135
private csvExporter: IgxCsvExporterService,
135-
private excelExporter: IgxExcelExporterService) {
136+
private excelExporter: IgxExcelExporterService,
137+
private activatedRoute: ActivatedRoute) {
136138

137139
const exporterCb = (args: IColumnExportingEventArgs) => {
138140
if (args.field === 'Deals') { args.cancel = true; }
@@ -148,6 +150,9 @@ export class GridCRMComponent implements OnInit, AfterViewInit {
148150
this.getDeals(employee);
149151
}
150152
this.localData = employees;
153+
this.activatedRoute.queryParams.subscribe(params => {
154+
this.dark = !!params.dark;
155+
});
151156
}
152157

153158
public toggleHiding() {

0 commit comments

Comments
 (0)