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 - Feed FileReader from server side files -

How to Change swipe Tab Title color in java Android -

Using globs in Perl replace one liner in TCL script -