For example - I’ve an array like this:
public Market = [‘Apple’, ‘Vegatables’, ‘Orange’, ‘Banana’, ‘Pear’]
And this Alert:
async Alert1() {
const alert = await this.alert.create({
cssClass: 'my-custom-class',
header: 'Market',
inputs: [
{
name: 'checkbox1',
type: 'checkbox',
cssClass: 'secondary',
label: {{Market [0]}} ,
value: 'value1',
},
{
name: 'checkbox2',
type: 'checkbox',
cssClass: 'secondary',
label: {console.log (Market [3])},
value: 'value1',
}
]
I need to use the values of my array in the checkbox label. I used some commands like: {{Market [0]}} and {console.log (Market [0])}; but none of them worked. How do I do that? After selecting an item from the selection box, how do I change the color of a button?