zRegister
This commit is contained in:
@@ -1,11 +1,3 @@
|
||||
<!--
|
||||
Authors : initappz (Rahul Jograna)
|
||||
Website : https://initappz.com/
|
||||
App Name : E-Learning App Template
|
||||
This App Template Source code is licensed as per the
|
||||
terms found in the Website https://initappz.com/license
|
||||
Copyright and Good Faith Purchasers © 2021-present initappz.
|
||||
-->
|
||||
<ion-header mode="ios" class="ion-no-border">
|
||||
<ion-toolbar>
|
||||
<ion-buttons slot="start" (click)="onBack()">
|
||||
@@ -18,7 +10,7 @@
|
||||
<ion-icon name="ellipsis-horizontal-circle-outline"></ion-icon>
|
||||
</ion-button>
|
||||
</ion-buttons>
|
||||
<ion-title>Notification</ion-title>
|
||||
<ion-title>Notifications</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
<ion-item lines="none" (click)="onNotification()">
|
||||
<ion-icon name="notifications-outline" color="dark"></ion-icon>
|
||||
<ion-label>Notification</ion-label>
|
||||
<ion-label>Notifications</ion-label>
|
||||
<ion-icon name="chevron-forward-outline" color="medium"></ion-icon>
|
||||
</ion-item>
|
||||
|
||||
|
||||
@@ -11,24 +11,24 @@
|
||||
|
||||
<ion-item lines="none">
|
||||
<ion-icon slot="start" name="person-outline"></ion-icon>
|
||||
<ion-input type="firstname" placeholder="Firstname"></ion-input>
|
||||
<ion-input type="firstname" placeholder="Firstname" [(ngModel)]='firstname'></ion-input>
|
||||
</ion-item>
|
||||
|
||||
|
||||
<ion-item lines="none">
|
||||
<ion-icon slot="start" name="person-outline"></ion-icon>
|
||||
<ion-input type="lastname" placeholder="Lastname"></ion-input>
|
||||
<ion-input type="lastname" placeholder="Lastname" [(ngModel)]='lastname'></ion-input>
|
||||
</ion-item>
|
||||
|
||||
|
||||
<ion-item lines="none">
|
||||
<ion-icon slot="start" name="mail-outline"></ion-icon>
|
||||
<ion-input type="email" placeholder="Email (your username)"></ion-input>
|
||||
<ion-input type="username" placeholder="Email (your username)" [(ngModel)]='username'></ion-input>
|
||||
</ion-item>
|
||||
|
||||
<ion-item lines="none">
|
||||
<ion-icon slot="start" name="lock-closed-outline"></ion-icon>
|
||||
<ion-input type="password" placeholder="Password"></ion-input>
|
||||
<ion-input type="password" placeholder="Password" [(ngModel)]='password'></ion-input>
|
||||
</ion-item>
|
||||
|
||||
<!-- <ion-item lines="none">-->
|
||||
|
||||
@@ -1,13 +1,6 @@
|
||||
/*
|
||||
Authors : initappz (Rahul Jograna)
|
||||
Website : https://initappz.com/
|
||||
App Name : E-Learning App Template
|
||||
This App Template Source code is licensed as per the
|
||||
terms found in the Website https://initappz.com/license
|
||||
Copyright and Good Faith Purchasers © 2021-present initappz.
|
||||
*/
|
||||
import { Router } from '@angular/router';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import {Component, OnInit, ViewChild} from '@angular/core';
|
||||
import {ToastController} from "@ionic/angular";
|
||||
|
||||
@Component({
|
||||
selector: 'app-register',
|
||||
@@ -15,10 +8,29 @@ import { Component, OnInit } from '@angular/core';
|
||||
styleUrls: ['./register.page.scss'],
|
||||
})
|
||||
export class RegisterPage implements OnInit {
|
||||
|
||||
@ViewChild('username') username;
|
||||
@ViewChild('password') password;
|
||||
@ViewChild('firstname') firstname;
|
||||
@ViewChild('lastname') lastname;
|
||||
@ViewChild('country') country;
|
||||
/*
|
||||
'firstname': 'OluNG' ,
|
||||
'lastname': 'AmeyNG' ,
|
||||
'email': 'ameye+aug6160@chiefsoft.com' ,
|
||||
'username': 'ameye+aug6160@chiefsoft.com' ,
|
||||
'password': 'may12002' ,
|
||||
'terms' => 1,
|
||||
'news' => int 1
|
||||
'loc': '38.101.241.200' ,
|
||||
'country': 'NG' ,
|
||||
'action' => 11010
|
||||
*/
|
||||
constructor(
|
||||
private router: Router
|
||||
) { }
|
||||
private router: Router,
|
||||
private toastController: ToastController
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
@@ -28,7 +40,39 @@ export class RegisterPage implements OnInit {
|
||||
}
|
||||
|
||||
onFillProfile() {
|
||||
this.router.navigate(['fill-profile']);
|
||||
}
|
||||
|
||||
//debugger;
|
||||
|
||||
if (this.username == null || this.username == '' || this.validateEmail(this.username) == false
|
||||
|| this.password == null || this.password == ''
|
||||
|| this.firstname == null || this.firstname == ''
|
||||
|| this.lastname == null || this.lastname == '') {
|
||||
this.presentToast('Missing Required Inputs', 'middle');
|
||||
return;
|
||||
}
|
||||
//this.router.navigate(['fill-profile']);
|
||||
alert("WE CALL API NOW");
|
||||
}
|
||||
showAlert(mtitle: string, amessage: string) {
|
||||
/* let alert = this.alertCtrl.create({
|
||||
title: mtitle,
|
||||
subTitle: amessage,
|
||||
buttons: ['OK']
|
||||
});
|
||||
alert.present();*/
|
||||
alert(amessage);
|
||||
}
|
||||
validateEmail(email) {
|
||||
var re = /\S+@\S+\.\S+/;
|
||||
return re.test(email);
|
||||
}
|
||||
async presentToast(amessage, position: 'top' | 'middle' | 'bottom') {
|
||||
const toast = await this.toastController.create({
|
||||
message: amessage,
|
||||
duration: 1500,
|
||||
position: position,
|
||||
});
|
||||
|
||||
await toast.present();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user