Skip to content

Commit 5fccb18

Browse files
committed
refactor(material/divider): convert to standalone
Converts `material/divider` to standalone.
1 parent 7122f18 commit 5fccb18

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

src/material/divider/divider-module.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ import {MatCommonModule} from '@angular/material/core';
1111
import {MatDivider} from './divider';
1212

1313
@NgModule({
14-
imports: [MatCommonModule],
14+
imports: [MatCommonModule, MatDivider],
1515
exports: [MatDivider, MatCommonModule],
16-
declarations: [MatDivider],
1716
})
1817
export class MatDividerModule {}

src/material/divider/divider.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ describe('MatDivider', () => {
88

99
beforeEach(fakeAsync(() => {
1010
TestBed.configureTestingModule({
11-
imports: [MatDividerModule],
12-
declarations: [MatDividerTestComponent],
11+
imports: [MatDividerModule, MatDividerTestComponent],
1312
});
1413

1514
TestBed.compileComponents();
@@ -65,6 +64,8 @@ describe('MatDivider', () => {
6564

6665
@Component({
6766
template: `<mat-divider [vertical]="vertical" [inset]="inset"></mat-divider>`,
67+
standalone: true,
68+
imports: [MatDividerModule],
6869
})
6970
class MatDividerTestComponent {
7071
vertical: boolean;

src/material/divider/divider.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';
2323
styleUrls: ['divider.css'],
2424
encapsulation: ViewEncapsulation.None,
2525
changeDetection: ChangeDetectionStrategy.OnPush,
26+
standalone: true,
2627
})
2728
export class MatDivider {
2829
/** Whether the divider is vertically aligned. */

src/material/divider/testing/divider-harness.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ describe('MatLegacyButtonHarness', () => {
1111

1212
beforeEach(async () => {
1313
await TestBed.configureTestingModule({
14-
imports: [MatDividerModule],
15-
declarations: [DividerHarnessTest],
14+
imports: [MatDividerModule, DividerHarnessTest],
1615
}).compileComponents();
1716

1817
fixture = TestBed.createComponent(DividerHarnessTest);
@@ -43,5 +42,7 @@ describe('MatLegacyButtonHarness', () => {
4342
<mat-divider></mat-divider>
4443
<mat-divider inset vertical></mat-divider>
4544
`,
45+
standalone: true,
46+
imports: [MatDividerModule],
4647
})
4748
class DividerHarnessTest {}

tools/public_api_guard/material/divider.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import { BooleanInput } from '@angular/cdk/coercion';
88
import * as i0 from '@angular/core';
9-
import * as i2 from '@angular/material/core';
9+
import * as i1 from '@angular/material/core';
1010

1111
// @public (undocumented)
1212
export class MatDivider {
@@ -15,7 +15,7 @@ export class MatDivider {
1515
get vertical(): boolean;
1616
set vertical(value: BooleanInput);
1717
// (undocumented)
18-
static ɵcmp: i0.ɵɵComponentDeclaration<MatDivider, "mat-divider", never, { "vertical": { "alias": "vertical"; "required": false; }; "inset": { "alias": "inset"; "required": false; }; }, {}, never, never, false, never>;
18+
static ɵcmp: i0.ɵɵComponentDeclaration<MatDivider, "mat-divider", never, { "vertical": { "alias": "vertical"; "required": false; }; "inset": { "alias": "inset"; "required": false; }; }, {}, never, never, true, never>;
1919
// (undocumented)
2020
static ɵfac: i0.ɵɵFactoryDeclaration<MatDivider, never>;
2121
}
@@ -27,7 +27,7 @@ export class MatDividerModule {
2727
// (undocumented)
2828
static ɵinj: i0.ɵɵInjectorDeclaration<MatDividerModule>;
2929
// (undocumented)
30-
static ɵmod: i0.ɵɵNgModuleDeclaration<MatDividerModule, [typeof i1.MatDivider], [typeof i2.MatCommonModule], [typeof i1.MatDivider, typeof i2.MatCommonModule]>;
30+
static ɵmod: i0.ɵɵNgModuleDeclaration<MatDividerModule, never, [typeof i1.MatCommonModule, typeof i2.MatDivider], [typeof i2.MatDivider, typeof i1.MatCommonModule]>;
3131
}
3232

3333
// (No @packageDocumentation comment for this package)

0 commit comments

Comments
 (0)