我正在尝试通过角度从FORM中选择 Object.property(Opcao.correta),但是 bool属性中的值未定义。这是我的代码:
<div data-ng-repeat="Opcao in Questao.opcoes" class="row form-group col-md-8">
<label class="btn btn-light">
<input type="radio" ng-model="Opcao.correta" name="Opcao_correta" ng-checked="Opcao.correta"> OPÇÃO {{getLetra(Opcao.ordem)}} )
</label>
<div class="input-group">
<textarea cols="50" rows="3" ng-model="Opcao.descricao" class="form-control" name="Opcao.descricao" placeholder="Informe aqui a opção {{getLetra(Opcao.ordem)}}" required></textarea>
<button ng-click="removeOpcao()" class="btn btn-danger">X</button>
</div>
</div>
下图显示了console.log(Object)。布尔属性(correta)未定义。
See the image - console.log(Object)
我想从被检查的收音机中得知事实。谢谢您的帮助!