title: Alert is not function error is console
body: <p>I'm integrating otp functionality in ionic 3 project. When I send the otp I'm receiving the otp but not redirecting to the otp receive the page because of this error.</p>
  
  <p>Below is console error
  Getting below error on sending otp</p>
  
  <blockquote>
    <p>ERROR TypeError: alert is not a function
        at SafeSubscriber._error (home.ts:45)
        at SafeSubscriber.__tryOrUnsub (Subscriber.js:238)
        at SafeSubscriber.error (Subscriber.js:197)
        at Subscriber._error (Subscriber.js:128)
        at Subscriber.error (Subscriber.js:102)
        at MapSubscriber._next (map.js:82)
        at MapSubscriber.Subscriber.next (Subscriber.js:89)
        at XMLHttpRequest.onLoad (http.js:1556)
        at t.invokeTask (polyfills.js:3)
        at Object.onInvokeTask (core.js:4620)</p>
  </blockquote>
  
  <p>I'm receiving the otp but page is not redirecting to the otp receive page because of this error</p>
  
  <p>My code:</p>
  
  <pre><code>import {Component} from '@angular/core';
  import {NavController, Platform, AlertController} from 'ionic-angular';
  import {Http, Headers} from '@angular/http';
  import 'rxjs/add/operator/map';
  import {OtpReceivePage} from '../otp-receive/otp-receive';
  
  
  @Component({
      selector: 'page-home',
      templateUrl: 'home.html'
  })
  export class HomePage {
  
      mobile = '';
  
      constructor(public alertCtrl: AlertController,
                  public http: Http,
                  public navCtrl: NavController) {
      }
  
      sendOTP() {
          if (this.mobile.length != 12) {
              let alert = this.alertCtrl.create({
                  title: 'Mobile Number Required!',
                  subTitle: 'Please enter your 10 digit mobile number with 91 country code!',
                  buttons: ['OK']
              });
              alert.present();
          }
          else {
              this.http.get('http://localhost:8080/nexmosms/send-sms.php')
                  .map(res =&gt; res.json())
                  .subscribe(res =&gt; {
                      console.log(JSON.stringify(res));
                      this.navCtrl.push(OtpReceivePage, {mobileno: this.mobile})
                  }, (err) =&gt; {
                      alert("failed");
                  });
          }
      }
  }
  </code></pre>