我的html中有这段代码
<md-radio-group #myOption="ngModel" name="myOption" [(ngModel)]="Person.myoption">
<md-radio-button [value]="'Option 1'">Option 1</md-radio-button>
<md-radio-button [value]="'Option 2'">Option 2</md-radio-button>
<md-radio-button [value]="other" (change)="enableInput($event)">Other</md-radio-button>
<md-input-container>
<input mdInput #otherOpt="ngModel" name="otherOpt" [disabled]="another" [(ngModel)]="other" placeholder="Other option..">
</md-input-container>
</md-radio-group>
<div>The option is: {{Person.myoption}}</div>
和我的Component.ts
enabledInput(e: MdRadioChange){
if(e.source.checked) {
this.another=false;
}
}
当我选择第一个或第二个选项时,在显示{{Person.myoption}}的div中显示正常,但是当我选择第三个&#34;其他选项&#34;时,我无法绑定它正确到我的div