@ariff23 wrote:
this is my code admin login.ts
import { Component } from ‘@angular/core’;
import { IonicPage, NavController, NavParams, AlertController, LoadingController, ToastController } from ‘ionic-angular’;
import { AdminDashboardPage } from ‘…/admin-dashboard/admin-dashboard’;
import { AngularFireAuth } from ‘angularfire2/auth’;@IonicPage()
@Component({
selector: ‘page-admin-login’,
templateUrl: ‘admin-login.html’,
})
export class AdminLoginPage {constructor(public navCtrl: NavController, public navParams: NavParams,
public alertCtrl: AlertController, private afAuth: AngularFireAuth,
public loadingCtrl:LoadingController, public toastCtrl: ToastController) {
}ionViewDidLoad() {
console.log(‘ionViewDidLoad AdminLoginPage’);
}SignInAdmin(){
var email = "admin@gmail.com";
var password = “admin123”;
var that = this;var loader = this.loadingCtrl.create({ content: "Please wait..." }); loader.present(); this.afAuth.auth.signInWithEmailAndPassword(email,password) //successful loader.dismiss(); that.navCtrl.setRoot(AdminDashboardPage); error => {
loader.dismiss();
// Unable to log in
let toast = this.toastCtrl.create({
message: error,
duration: 3000,
position: ‘top’
});
toast.present();
};
}but why i got this error can somebody help me
Posts: 3
Participants: 2