ionic2 AlertController scope issues
<p>I am using ionic2/angular2 application for developing mobile application. we have to call another external API to show one dialog box. After returning from another control to my application the <strong>AlertController</strong> scope is not working.</p>

<pre><code>    import {AlertController, Events } from 'ionic-angular';
    export class BalanceInquiryPage {
      constructor(){
        public alertCtrl: AlertController,
        public events: Events,
      }

      public balanceDetials(formdata): void {
          //fetch the device details from sqlite storage
          this.databaseService.getDeviceDetails().then((result) =&gt; {
             this.commonServices.getGeoLocation(this.deviceObj);
             setTimeout(() =&gt; {
               let geodevice = this.shareService.getDeviceDetails();
               let balanceenq = JSON.stringify({"mobileNumber":"9199403562", "expDate":"","cardDigits":""});         
              if (window.npciLib){
                 window.npciLib.balanceenq(balanceenq, function (data) {                  
                      let dataobj = JSON.parse(data);
                      if(dataobj.resp.result == 'SUCCESS'){
                        //this.events.publish('alert:presented', 'Success', 'Balance Enquiry Success.', MyaccountPage);
                        let alert = this.alertCtrl.create({
                          title: "Success",
                          subTitle: "balance",
                          buttons: [
                            {
                              text: 'Ok',
                              handler: () =&gt; {

                              }
                            }
                          ]
                        });
                        alert.present();
                      }
                      else{
                        //this.events.publish('alert:presented', 'Fail', 'There was an error in balance enquiry.', 'samePage');
                      }
                   }, function (error) {
                      console.log('error block-'+error);
                   });
               }
              }, 1000);
         }, (error) =&gt; {
           console.log('Error', error.err);
         });
        }
   }
</code></pre>

<p>I am getting the following error :</p>

<blockquote>
  <p>Uncaught TypeError: Cannot read property 'alertCtrl' of null</p>
</blockquote>