Hi, 

I am newbie to Angular. 

I have a radio button inside ng-repeat tag. and i want the first radio 
button to be selected by default. I have tried couple of things but nothing 
seems to work

<tbody ng-repeat="member in members[exception.id] track by $index" 
ng-if="!$first">
     <tr class="non-editable" ng-class="{ 'is-selected': isSelected( 
$index, exception ) === true }" ng-click="setSelection( $index,         
 exception,$first,formData )">
         <td class="td-radio" bs-tooltip title="Mark this row as correct." 
data-placement="left" data-container="body">
             <div class="radio standalone">
                 <label class="ui-radio">
                     <input name="selectedRow" ng-click="setSelection( 
$index, exception,$first )" id="{{$index}}{{exception.description}}{{       
                      person.firstName }}{{ person.lastName }}"
                                        value="{{$index}}" 
 ng-model="formData.selectedMember" type="radio" ng-init="setSelection(     
                        $index, exception,$first )" ><span></span>
                 </label>
                        </div>
                 </td>
     </tr>
</tbody>


I tried following within input tag
1. ng-checked="true" or ng-checked="$first"
2. "ng-init=checked=true"
3. checked
4. ng-checked="member.checked"

None of them seems to work. ng-init tag with setSelection is highlighting 
the row but not selecting. Please help. 

Thanks
Neha

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to