Does not show value in ng-repeat

0

I have the following:

<div ng-repeat="(key, value) in result">                            
   {{value}}  => ESTO LO MUESTRA
<input type="radio" name="rGrpLab" ng-model="rGrpLab" value="key">
</div>

{{rGrpLab}} => ESTO NO LO MUESTRA

I know it's because it's inside the ng-repeat , but I do not know how to get that value.

Any suggestions?

Greetings

    
asked by sirdaiz 01.12.2016 в 12:48
source

1 answer

1

Sometimes angular has problems with the scope. I recommend you convert rGrpLab in a dictionary and try the following

<div ng-repeat="(key, value) in result">                            
   {{value}}
<input type="radio" name="rGrpLab" ng-model="rGrpLab.value" value="key">
</div>

{{rGrpLab.value}}
    
answered by 01.12.2016 / 13:36
source