这是我的代码。当我提交switchColors时,服务器返回undefined。这是怎么回事?如何在Angular中做单选按钮
另外我应该如何在控制器中启动$ scope.swichColors?目前我有$ scope.switchColors ='';
<label class="radio-inline">
<input type="radio" ng-model="$parent.switchColors" value = "yes" >Yes</input>
</label>
<label class="radio-inline">
<input type= "radio" ng-model = "$parent.switchColors" value = "no" >No</input>
</label>
可能帮助你http://stackoverflow.com/questions/36244427/angular-js-inputradio-doesnt-work/36244545#36244545 –