Skip to content

Commit

Permalink
fix(material-experimental/radio): rename mdc-radio APIs to match exis…
Browse files Browse the repository at this point in the history
…ting radio APIs (#17178)
  • Loading branch information
YourDeveloperFriend authored and jelbourn committed Sep 27, 2019
1 parent f084f13 commit 8e141ef
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/dev-app/mdc-radio/mdc-radio-demo.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h1>Basic Example</h1>
<section class="demo-section">
<mat-radio name="group1">Option 1</mat-radio>
<mat-radio name="group1">Option 2</mat-radio>
<mat-radio name="group1" disabled>Option 3 (Disabled)</mat-radio>
<mat-radio-button name="group1">Option 1</mat-radio-button>
<mat-radio-button name="group1">Option 2</mat-radio-button>
<mat-radio-button name="group1" disabled>Option 3 (Disabled)</mat-radio-button>
</section>
6 changes: 3 additions & 3 deletions src/material-experimental/mdc-radio/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
import {CommonModule} from '@angular/common';
import {NgModule} from '@angular/core';
import {MatCommonModule} from '@angular/material/core';
import {MatRadio} from './radio';
import {MatRadioButton} from './radio';

@NgModule({
imports: [MatCommonModule, CommonModule],
exports: [MatRadio, MatCommonModule],
declarations: [MatRadio],
exports: [MatRadioButton, MatCommonModule],
declarations: [MatRadioButton],
})
export class MatRadioModule {
}
6 changes: 3 additions & 3 deletions src/material-experimental/mdc-radio/radio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ let nextUniqueId = 0;

@Component({
moduleId: module.id,
selector: 'mat-radio',
selector: 'mat-radio-button',
templateUrl: 'radio.html',
styleUrls: ['radio.css'],
host: {
'class': 'mat-mdc-radio',
'[attr.id]': 'id',
},
exportAs: 'matRadio',
exportAs: 'matRadioButton',
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class MatRadio implements AfterViewInit, OnDestroy {
export class MatRadioButton implements AfterViewInit, OnDestroy {

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

Expand Down

0 comments on commit 8e141ef

Please sign in to comment.