Skip to content

Commit 8e141ef

Browse files
Nathan Tatejelbourn
authored andcommitted
fix(material-experimental/radio): rename mdc-radio APIs to match existing radio APIs (#17178)
1 parent f084f13 commit 8e141ef

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<h1>Basic Example</h1>
22
<section class="demo-section">
3-
<mat-radio name="group1">Option 1</mat-radio>
4-
<mat-radio name="group1">Option 2</mat-radio>
5-
<mat-radio name="group1" disabled>Option 3 (Disabled)</mat-radio>
3+
<mat-radio-button name="group1">Option 1</mat-radio-button>
4+
<mat-radio-button name="group1">Option 2</mat-radio-button>
5+
<mat-radio-button name="group1" disabled>Option 3 (Disabled)</mat-radio-button>
66
</section>

src/material-experimental/mdc-radio/module.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
import {CommonModule} from '@angular/common';
1010
import {NgModule} from '@angular/core';
1111
import {MatCommonModule} from '@angular/material/core';
12-
import {MatRadio} from './radio';
12+
import {MatRadioButton} from './radio';
1313

1414
@NgModule({
1515
imports: [MatCommonModule, CommonModule],
16-
exports: [MatRadio, MatCommonModule],
17-
declarations: [MatRadio],
16+
exports: [MatRadioButton, MatCommonModule],
17+
declarations: [MatRadioButton],
1818
})
1919
export class MatRadioModule {
2020
}

src/material-experimental/mdc-radio/radio.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@ let nextUniqueId = 0;
2323

2424
@Component({
2525
moduleId: module.id,
26-
selector: 'mat-radio',
26+
selector: 'mat-radio-button',
2727
templateUrl: 'radio.html',
2828
styleUrls: ['radio.css'],
2929
host: {
3030
'class': 'mat-mdc-radio',
3131
'[attr.id]': 'id',
3232
},
33-
exportAs: 'matRadio',
33+
exportAs: 'matRadioButton',
3434
encapsulation: ViewEncapsulation.None,
3535
changeDetection: ChangeDetectionStrategy.OnPush,
3636
})
37-
export class MatRadio implements AfterViewInit, OnDestroy {
37+
export class MatRadioButton implements AfterViewInit, OnDestroy {
3838

3939
private _uniqueId: string = `mat-radio-${++nextUniqueId}`;
4040

0 commit comments

Comments
 (0)