Skip to content

Commit c7cc0be

Browse files
authored
refactor: remove remaining NgClass usages (#32873)
Removes a couple of leftover usages of `NgClass` in tests.
1 parent 85c16fe commit c7cc0be

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

src/cdk/drag-drop/directives/drop-list-shared.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import {DragRef, Point, PreviewContainer} from '../drag-ref';
3131
import {moveItemInArray} from '../drag-utils';
3232

3333
import {provideFakeDirectionality} from '@angular/cdk/testing/private/fake-directionality';
34-
import {NgClass, NgFor, NgIf, NgTemplateOutlet} from '@angular/common';
34+
import {NgFor, NgIf, NgTemplateOutlet} from '@angular/common';
3535
import {CDK_DRAG_CONFIG, DragAxis, DragDropConfig, DropListOrientation} from './config';
3636
import {CdkDrag} from './drag';
3737
import {CdkDragPlaceholder} from './drag-placeholder';
@@ -5402,7 +5402,7 @@ class DraggableInDropZoneWithCustomMultiNodePreview {
54025402
@if (renderPlaceholder) {
54035403
<div
54045404
class="custom-placeholder"
5405-
[ngClass]="extraPlaceholderClass"
5405+
[class]="extraPlaceholderClass"
54065406
*cdkDragPlaceholder>Custom placeholder</div>
54075407
}
54085408
</div>
@@ -5414,7 +5414,7 @@ class DraggableInDropZoneWithCustomMultiNodePreview {
54145414
height: ${ITEM_HEIGHT * 3}px;
54155415
}
54165416
`,
5417-
imports: [CdkDropList, CdkDrag, CdkDragPlaceholder, NgClass],
5417+
imports: [CdkDropList, CdkDrag, CdkDragPlaceholder],
54185418
})
54195419
class DraggableInDropZoneWithCustomPlaceholder {
54205420
@ViewChildren(CdkDrag) dragItems!: QueryList<CdkDrag>;

src/cdk/table/BUILD.bazel

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ ng_project(
1616
),
1717
assets = [":table.css"],
1818
deps = [
19-
"//:node_modules/@angular/common",
2019
"//:node_modules/@angular/core",
2120
"//:node_modules/rxjs",
2221
"//src:dev_mode_types",
@@ -42,7 +41,6 @@ ng_project(
4241
),
4342
deps = [
4443
":table",
45-
"//:node_modules/@angular/common",
4644
"//:node_modules/@angular/core",
4745
"//:node_modules/@angular/platform-browser",
4846
"//:node_modules/rxjs",

src/cdk/table/table.spec.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ import {
4343
getTableUnknownColumnError,
4444
getTableUnknownDataSourceError,
4545
} from './table-errors';
46-
import {NgClass} from '@angular/common';
4746
import {CdkVirtualScrollViewport, ScrollingModule} from '../scrolling';
4847
import {dispatchFakeEvent} from '../testing/private';
4948

@@ -2977,7 +2976,7 @@ class UndefinedColumnsCdkTableApp {
29772976
<cdk-header-cell *cdkHeaderCellDef> Column A</cdk-header-cell>
29782977
<cdk-cell *cdkCellDef="let row; let first = first;
29792978
let last = last; let even = even; let odd = odd"
2980-
[ngClass]="{
2979+
[class]="{
29812980
'custom-cell-class-first': enableCellContextClasses && first,
29822981
'custom-cell-class-last': enableCellContextClasses && last,
29832982
'custom-cell-class-even': enableCellContextClasses && even,
@@ -2989,7 +2988,7 @@ class UndefinedColumnsCdkTableApp {
29892988
<cdk-header-row *cdkHeaderRowDef="columnsToRender"></cdk-header-row>
29902989
<cdk-row *cdkRowDef="let row; columns: columnsToRender;
29912990
let first = first; let last = last; let even = even; let odd = odd"
2992-
[ngClass]="{
2991+
[class]="{
29932992
'custom-row-class-first': enableRowContextClasses && first,
29942993
'custom-row-class-last': enableRowContextClasses && last,
29952994
'custom-row-class-even': enableRowContextClasses && even,
@@ -2998,7 +2997,7 @@ class UndefinedColumnsCdkTableApp {
29982997
</cdk-row>
29992998
</cdk-table>
30002999
`,
3001-
imports: [CdkTableModule, NgClass],
3000+
imports: [CdkTableModule],
30023001
})
30033002
class RowContextCdkTableApp {
30043003
dataSource = new FakeDataSource();

0 commit comments

Comments
 (0)