@@ -80,8 +80,8 @@ import { Platform } from '../../platform/platform';
8080@Component ( {
8181 selector : 'ion-input,ion-textarea' ,
8282 template :
83- '<input [(ngModel)]="_value" [type]="type" (blur)="inputBlurred($event)" (focus)="inputFocused($event)" [placeholder]="placeholder" class="text-input" [ngClass]="\'text-input-\' + _mode" *ngIf="_type!==\'textarea\'" #input>' +
84- '<textarea [(ngModel)]="_value" (blur)="inputBlurred($event)" (focus)="inputFocused($event)" [placeholder]="placeholder" class="text-input" [ngClass]="\'text-input-\' + _mode" *ngIf="_type===\'textarea\'" #textarea></textarea>' +
83+ '<input [(ngModel)]="_value" [type]="type" (blur)="inputBlurred($event)" (focus)="inputFocused($event)" [placeholder]="placeholder" [disabled]="disabled" class="text-input" [ngClass]="\'text-input-\' + _mode" *ngIf="_type!==\'textarea\'" #input>' +
84+ '<textarea [(ngModel)]="_value" (blur)="inputBlurred($event)" (focus)="inputFocused($event)" [placeholder]="placeholder" [disabled]="disabled" class="text-input" [ngClass]="\'text-input-\' + _mode" *ngIf="_type===\'textarea\'" #textarea></textarea>' +
8585 '<input [type]="type" aria-hidden="true" next-input *ngIf="_useAssist">' +
8686 '<button ion-button clear [hidden]="!clearInput" type="button" class="text-input-clear-icon" (click)="clearTextInput()" (mousedown)="clearTextInput()"></button>' +
8787 '<div (touchstart)="pointerStart($event)" (touchend)="pointerEnd($event)" (mousedown)="pointerStart($event)" (mouseup)="pointerEnd($event)" class="input-cover" tappable *ngIf="_useAssist"></div>' ,
@@ -120,7 +120,7 @@ export class TextInput extends Ion implements IonicFormInput {
120120 @Optional ( ) private _content : Content ,
121121 @Optional ( ) private _item : Item ,
122122 @Optional ( ) nav : NavController ,
123- @Optional ( ) ngControl : NgControl ,
123+ @Optional ( ) public ngControl : NgControl ,
124124 private _dom : DomController
125125 ) {
126126 super ( config , elementRef , renderer , 'input' ) ;
@@ -212,7 +212,7 @@ export class TextInput extends Ion implements IonicFormInput {
212212 */
213213 @Input ( )
214214 get disabled ( ) {
215- return this . _disabled ;
215+ return this . ngControl ? this . ngControl . disabled : this . _disabled ;
216216 }
217217 set disabled ( val : boolean ) {
218218 this . setDisabled ( this . _disabled = isTrueProperty ( val ) ) ;
@@ -293,6 +293,7 @@ export class TextInput extends Ion implements IonicFormInput {
293293 setNativeInput ( nativeInput : NativeInput ) {
294294 this . _native = nativeInput ;
295295 nativeInput . setValue ( this . _value ) ;
296+ nativeInput . isDisabled ( this . disabled ) ;
296297
297298 if ( this . _item && this . _item . labelId !== null ) {
298299 nativeInput . labelledBy ( this . _item . labelId ) ;
0 commit comments