How to properly add more than one ion-radio in a template?

0

I'm having trouble adding more than one ion-radio to a template.

I have a screen with an ion-radio that is working accordingly. But I need to add a few more and I'm having trouble.  

When I dial the first radio option marking, it works accordingly. But if I check one option from the other radio, it is unchecking the selection of the other, What do I do to solve?

Here are the codes I'm using:

<ion-radio 
     ng-repeat="report in config.relatorios" 
     ng-value="report.value" 
     ng-model="config.selecao.relatorio">    

     {{report.name}}

</ion-radio>

<ion-radio 
    ng-repeat="menu in config.menu" 
    ng-value="menu.value" 
    ng-model="config.selecao.menu">

    {{menu.name}}

</ion-radio>


 vm.menu = 
        [
            { name: 'Grid (Quadrado)', value: 'quadrado' }, 
            { name: 'Lista', value: 'lista' }, 
            { name: 'Grid (Circulo)', value: 'circulo' }
        ];

 vm.relatorios = 
         [
            { name: 'Diário', value: 'diario' }, 
            { name: 'Mensal', value: 'mensal' }
        ];

 vm.selecao = {
                menu: 'lista',
                relatorio: 'diario',
            };
    
asked by anonymous 01.09.2016 / 15:02

1 answer

1

I already had this problem and I was able to solve it simply by putting the name property on the ion-radio.

<ion-radio ng-repeat="menu in config.menu" ng-value="menu.value" ng-model="config.selecao.menu" name="1"> {{menu.name}} </ion-radio>

    
01.09.2016 / 15:56