diff --git a/src/demo-app/checkbox/checkbox-demo.html b/src/demo-app/checkbox/checkbox-demo.html index 0faf25ebd0f..090c933487d 100644 --- a/src/demo-app/checkbox/checkbox-demo.html +++ b/src/demo-app/checkbox/checkbox-demo.html @@ -7,7 +7,7 @@ (change)="isIndeterminate = false" [indeterminate]="isIndeterminate" [disabled]="isDisabled" - [align]="alignment"> + [labelPosition]="labelPosition"> Do you want to foobar the bazquux? - {{printResult()}} @@ -24,23 +24,23 @@
-

Alignment:

+

Label position:

- - +
- - + +
diff --git a/src/demo-app/checkbox/checkbox-demo.ts b/src/demo-app/checkbox/checkbox-demo.ts index 54a8e1104eb..3e38e02eead 100644 --- a/src/demo-app/checkbox/checkbox-demo.ts +++ b/src/demo-app/checkbox/checkbox-demo.ts @@ -79,7 +79,7 @@ export class CheckboxDemo { isIndeterminate: boolean = false; isChecked: boolean = false; isDisabled: boolean = false; - alignment: string = 'start'; + labelPosition: string = 'after'; useAlternativeColor: boolean = false; printResult() { diff --git a/src/lib/checkbox/checkbox.ts b/src/lib/checkbox/checkbox.ts index d10e172e5af..47df4e44063 100644 --- a/src/lib/checkbox/checkbox.ts +++ b/src/lib/checkbox/checkbox.ts @@ -142,21 +142,6 @@ export class MatCheckbox extends _MatCheckboxMixinBase implements ControlValueAc set required(value: boolean) { this._required = coerceBooleanProperty(value); } private _required: boolean; - /** - * Whether or not the checkbox should appear before or after the label. - * @deprecated - * @deletion-target 6.0.0 - */ - @Input() - get align(): 'start' | 'end' { - // align refers to the checkbox relative to the label, while labelPosition refers to the - // label relative to the checkbox. As such, they are inverted. - return this.labelPosition == 'after' ? 'start' : 'end'; - } - set align(value: 'start' | 'end') { - this.labelPosition = (value == 'start') ? 'after' : 'before'; - } - /** Whether the label should appear after or before the checkbox. Defaults to 'after' */ @Input() labelPosition: 'before' | 'after' = 'after'; diff --git a/src/material-examples/checkbox-configurable/checkbox-configurable-example.html b/src/material-examples/checkbox-configurable/checkbox-configurable-example.html index e39d6e8e1aa..a413ae67de6 100644 --- a/src/material-examples/checkbox-configurable/checkbox-configurable-example.html +++ b/src/material-examples/checkbox-configurable/checkbox-configurable-example.html @@ -9,9 +9,9 @@
- - Start - End + + After + Before
@@ -30,7 +30,7 @@ class="example-margin" [(ngModel)]="checked" [(indeterminate)]="indeterminate" - [align]="align" + [labelPosition]="labelPosition" [disabled]="disabled"> I'm a checkbox diff --git a/src/material-examples/checkbox-configurable/checkbox-configurable-example.ts b/src/material-examples/checkbox-configurable/checkbox-configurable-example.ts index f4bdf570a31..d5dc90e1a83 100644 --- a/src/material-examples/checkbox-configurable/checkbox-configurable-example.ts +++ b/src/material-examples/checkbox-configurable/checkbox-configurable-example.ts @@ -11,6 +11,6 @@ import {Component} from '@angular/core'; export class CheckboxConfigurableExample { checked = false; indeterminate = false; - align = 'start'; + labelPosition = 'after'; disabled = false; }