javascript - How to do radio buttons in Angular -


this code. when submit switchcolors, server returns undefined it. how wrong?

also how should initiate $scope.swichcolors in controller? have $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> 

try using ng-value instead of value

 <label class="radio-inline">         <input type="radio" ng-model="$parent.switchcolors" ng-value = "yes" >yes</input>     </label>      <label class="radio-inline">         <input type= "radio" ng-model = "$parent.switchcolors" ng-value = "no" >no</input>     </label> 

Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -