Invaslid login message
This commit is contained in:
@@ -4,6 +4,7 @@ import { WrenchService } from 'src/app/services/wrench.service';
|
||||
import { SessionDataProviderService } from 'src/app/store/session-data-provider.service';
|
||||
import { BlogDataService } from 'src/app/store/blog-data.service';
|
||||
import {NavController} from "@ionic/angular";
|
||||
import { AlertController } from '@ionic/angular';
|
||||
|
||||
@Component({
|
||||
selector: 'app-familylogin',
|
||||
@@ -25,6 +26,7 @@ export class FamilyloginPage implements OnInit {
|
||||
public sessionDataProviderService:SessionDataProviderService,
|
||||
public blogDataService:BlogDataService,
|
||||
private navctr: NavController,
|
||||
private alertController: AlertController
|
||||
) {
|
||||
|
||||
}
|
||||
@@ -51,6 +53,9 @@ export class FamilyloginPage implements OnInit {
|
||||
this.getBlogData();
|
||||
this.router.navigate(['tabs/tab1']);
|
||||
}
|
||||
else{
|
||||
this.showAlert("Error","Invalid Username/pin");
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -59,14 +64,15 @@ export class FamilyloginPage implements OnInit {
|
||||
this.navctr.back();
|
||||
}
|
||||
|
||||
showAlert(mtitle: string, amessage: string) {
|
||||
/* let alert = this.alertCtrl.create({
|
||||
title: mtitle,
|
||||
subTitle: amessage,
|
||||
buttons: ['OK']
|
||||
});
|
||||
alert.present();*/
|
||||
alert(amessage);
|
||||
async showAlert(mtitle: string, amessage: string) {
|
||||
const alert = await this.alertController.create({
|
||||
header: 'WrenchBoard',
|
||||
subHeader: mtitle,
|
||||
message: amessage,
|
||||
buttons: ['OK'],
|
||||
});
|
||||
|
||||
await alert.present();
|
||||
}
|
||||
|
||||
getBlogData(){
|
||||
|
||||
@@ -4,6 +4,7 @@ import { WrenchService } from 'src/app/services/wrench.service';
|
||||
import { SessionDataProviderService } from 'src/app/store/session-data-provider.service';
|
||||
import { BlogDataService } from 'src/app/store/blog-data.service';
|
||||
import { environment} from "../../../environments/environment";
|
||||
import { AlertController } from '@ionic/angular';
|
||||
|
||||
@Component({
|
||||
selector: 'app-login',
|
||||
@@ -21,7 +22,8 @@ export class LoginPage implements OnInit {
|
||||
private router: Router,
|
||||
private wrenchService: WrenchService,
|
||||
public sessionDataProviderService:SessionDataProviderService,
|
||||
public blogDataService:BlogDataService
|
||||
public blogDataService:BlogDataService,
|
||||
private alertController: AlertController
|
||||
) {
|
||||
|
||||
}
|
||||
@@ -60,6 +62,9 @@ getBlogData(){
|
||||
this.getBlogData();
|
||||
this.router.navigate(['tabs/tab1']);
|
||||
}
|
||||
else{
|
||||
this.showAlert("Error","Invalid username/password");
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -81,14 +86,24 @@ getBlogData(){
|
||||
return re.test(email);
|
||||
}
|
||||
|
||||
showAlert(mtitle: string, amessage: string) {
|
||||
/* let alert = this.alertCtrl.create({
|
||||
title: mtitle,
|
||||
subTitle: amessage,
|
||||
buttons: ['OK']
|
||||
});
|
||||
alert.present();*/
|
||||
alert(amessage);
|
||||
async showAlert(mtitle: string, amessage: string) {
|
||||
|
||||
const alert = await this.alertController.create({
|
||||
header: 'WrenchBoard',
|
||||
subHeader: mtitle,
|
||||
message: amessage,
|
||||
buttons: ['OK'],
|
||||
});
|
||||
|
||||
await alert.present();
|
||||
//
|
||||
// let alert = this.alertCtrl.create({
|
||||
// title: mtitle,
|
||||
// subTitle: amessage,
|
||||
// buttons: ['OK']
|
||||
// });
|
||||
// alert.present();
|
||||
// // alert(amessage);
|
||||
}
|
||||
familyLogin(){
|
||||
this.router.navigate(['familylogin']);
|
||||
|
||||
Reference in New Issue
Block a user