You can also easily create a list of Radiobuttons using a ngFor to loop through an array list. This was my solution
on the HTML template
<ion-row radio-group formControlName="toppings">
<ion-col *ngFor="let topping of toppings" col-auto>
<ion-item>
<ion-radio item-left value="{{topping}}"></ion-radio>
<ion-label>{{topping}}</ion-label>
</ion-item>
</ion-col>
</ion-row>
In your component
toppings: ['bacon', 'black-olives'];
FormA:FormGroup;
this.FormA = this.formBuilder.group(
{ toppings:[''],Validators.required]});
I used an ion-row and added the radio-group attribute. Then added the formControlName property and assigned to the Form Control. The ngFor is on the ion-col. This will end up creating a column for each item in your array and I added a template within that. In this case a RadioButton for each item.
You must assign the value property to the value of your array in order for this to work.
Makes the manual building of the Radio buttons a bit simpler.
To make my code more maintainable I created a file that exports constants of arrays to use through out my application. I just imported the class and assigned my property to the constant. If a new item is added to the array it will reflect through out the application instead of having to change multiple templates.
Ex in a shared .ts file:
export const Toppings = ['bacon', 'cheese' , 'olives'];
export const Base = ['Thick', 'Thin' , 'Gluten Free'];
In your component
import { Toppings , Base } from 'location/of/your/file
//Use "=" not ":" because you are assigning a constant Array and not creating a type of
toppings = Toppings;
base = Base;
Hope this helps.
<ion-option value="option1">Option 1</ion-option> <ion-option value="option2">Option 2</ion-option>and then you initialize it using those values like this?:toppings:[['option1', 'option2'], validators.required]