Skip to content

prototype(radio): Update mdc-radio to use names that match the existi… #17178

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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