I have followed and prepared a sample application for ‘Basic Alert’, but i an getting error as below,
TypeError: this.navCtrl1.create is not a function
the code which is explained, does not work for me. Can someone help me here ?
My code details as below mentioned.
<button ion-button block color=“blue” (click)=“sayHello()”> Say Hello!!!
import { Component } from ‘@angular/core’;
import { NavController } from ‘ionic-angular’;
@Component({
selector: ‘page-home’,
templateUrl: ‘home.html’
})
export class HomePage {
constructor(public navCtrl1: NavController) { }
sayHello(){
let alert = this.navCtrl1.create({
title: ‘Hi’,
subTiltle: ‘Welcome to Mobile Program’,
bottons: [‘OK’]
});
alert.present();
}
}