Home:ALL Converter>AlertController not found on ionic 2

AlertController not found on ionic 2

Ask Time:2016-08-06T21:22:42         Author:gastonche

Json Formatter

i am using ionic2@beta version 35. I am trying to use an alert box but i keep getting

Error TS2305: Module '"/home/webshinobis/boom/node_modules/ionic-angular/index"' has no exported member 'AlertController'. This is my code for the alert service:

import {AlertController} from 'ionic-angular';

export class alert {

  optionsBoxOpen: boolean;
  optionsBoxData: any;

  constructor(private alertController: AlertController) {}

  showCheckbox() {
    let alert = this.alertController.create();
    alert.setTitle('Which planets have you visited?');

    alert.addInput({
      type: 'checkbox',
      label: 'Alderaan',
      value: 'value1',
      checked: true
    });

    alert.addInput({
      type: 'checkbox',
      label: 'Bespin',
      value: 'value2'
    });

    alert.addButton('Cancel');
    alert.addButton({
      text: 'Okay',
      handler: data => {
        console.log('Checkbox data:', data);
        this.optionsBoxOpen = false;
        this.optionsBoxData = data;
      }
    });
    alert.present();

  }
}

Author:gastonche,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/38804736/alertcontroller-not-found-on-ionic-2
yy