Home:ALL Converter>Ionic 2/3/4 AlertController radio (ionChange) event handling

Ionic 2/3/4 AlertController radio (ionChange) event handling

Ask Time:2018-09-05T03:23:28         Author:Nasco.Chachev

Json Formatter

Good evening everyone. Wanted to ask you if there's a handler for the ionic alert radio buttons that handles the check by itself , but not buttons with handlers. Let's say I'm checking a radio and after that I'd like to execute any callback, but not on buttons click. Is there a way to succeed doing that? Been digging in github last hour but found nothing..

import { AllertController } from 'ionic-angular';

...
constructor( public alertController : AlertController ) {}
...

let alertController = this.alertController.create({
  title: `Title`,
  inputs: [
    {
     type: 'radio',
     label: 'Testlabel',
     value: 'Testvalue'
    },
    {
     type: 'radio',
     label: 'Testlabel',
     value: 'Testvalue'
    }
  ],
  buttons: [
   { text: 'Cancel' },
   { text: 'Save' , handler: (data: any) => { // Want to execute that code 
     on input check , rather than on click on 'Save' button } }
  ]
});

alertController.present();

If there is no any solution related to Alert Controller module , I will be glad to receive any custom solutions , that can reproduce AlertController functionality and styles (Something else rather than ModalController + ViewController) or at least will be glad to know how to represent ModalController container with the same styles and behaviour like AlertController

Thanks and have a good evening to everyone!!!!

Author:Nasco.Chachev,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/52172765/ionic-2-3-4-alertcontroller-radio-ionchange-event-handling
yy