Browse Source

linked login and register buttons to their respective pages

Kris Blassingame 6 years ago
parent
commit
338799485c

+ 9
- 2
frontEnd/src/app/app.module.ts View File

7
 import { MyApp } from './app.component';
7
 import { MyApp } from './app.component';
8
 import { GoogleMapComponent } from '../components/google-map/google-map';
8
 import { GoogleMapComponent } from '../components/google-map/google-map';
9
 import { HomePage } from '../pages/home/home';
9
 import { HomePage } from '../pages/home/home';
10
+import { LoginPage } from '../pages/login/login';
11
+import { RegisterPage } from '../pages/register/register';
10
 
12
 
11
 @NgModule({
13
 @NgModule({
12
   declarations: [
14
   declarations: [
13
     MyApp,
15
     MyApp,
14
     HomePage,
16
     HomePage,
15
-    GoogleMapComponent
17
+    GoogleMapComponent,
18
+    LoginPage,
19
+    RegisterPage
16
     
20
     
17
   ],
21
   ],
18
   imports: [
22
   imports: [
22
   bootstrap: [IonicApp],
26
   bootstrap: [IonicApp],
23
   entryComponents: [
27
   entryComponents: [
24
     MyApp,
28
     MyApp,
25
-    HomePage
29
+    HomePage,
30
+    GoogleMapComponent,
31
+    LoginPage,
32
+    RegisterPage
26
   ],
33
   ],
27
   providers: [
34
   providers: [
28
     StatusBar,
35
     StatusBar,

+ 5
- 5
frontEnd/src/pages/home/home.html View File

9
     <ion-item class="password">
9
     <ion-item class="password">
10
       <ion-input type="password" placeholder="Password"></ion-input>
10
       <ion-input type="password" placeholder="Password"></ion-input>
11
     </ion-item>
11
     </ion-item>
12
-    <button ion-button block>
12
+    <button ion-button block (click)="login()">
13
       <b>Login</b>
13
       <b>Login</b>
14
     </button>
14
     </button>
15
-    <button class="regButt" ion-button block>
16
-        <b>Register</b>
17
-      </button>
15
+    <button class="regButt" ion-button block (click)="register()">
16
+      <b>Register</b>
17
+    </button>
18
 
18
 
19
     <p>Forgot Username/Password?
19
     <p>Forgot Username/Password?
20
       <b>Tap here!</b>
20
       <b>Tap here!</b>
21
     </p>
21
     </p>
22
-    
22
+
23
   </div>
23
   </div>
24
 </ion-content>
24
 </ion-content>

+ 10
- 0
frontEnd/src/pages/home/home.ts View File

1
 import { Component } from '@angular/core';
1
 import { Component } from '@angular/core';
2
 import { NavController } from 'ionic-angular';
2
 import { NavController } from 'ionic-angular';
3
+import { LoginPage } from '../login/login';
4
+import { RegisterPage } from '../register/register';
3
 
5
 
4
 @Component({
6
 @Component({
5
   selector: 'page-home',
7
   selector: 'page-home',
11
 
13
 
12
   }
14
   }
13
 
15
 
16
+  login() {
17
+    this.navCtrl.push(LoginPage);
18
+  }
19
+
20
+  register() {
21
+    this.navCtrl.push(RegisterPage);
22
+
23
+  }
14
 }
24
 }

+ 1
- 7
frontEnd/src/pages/login/login.html View File

1
-<!--
2
-  Generated template for the LoginPage page.
3
-
4
-  See http://ionicframework.com/docs/components/#navigation for more info on
5
-  Ionic pages and navigation.
6
--->
7
 <ion-header>
1
 <ion-header>
8
 
2
 
9
   <ion-navbar>
3
   <ion-navbar>
10
-    <ion-title>login</ion-title>
4
+    <ion-title>Login</ion-title>
11
   </ion-navbar>
5
   </ion-navbar>
12
 
6
 
13
 </ion-header>
7
 </ion-header>

+ 1
- 7
frontEnd/src/pages/register/register.html View File

1
-<!--
2
-  Generated template for the RegisterPage page.
3
-
4
-  See http://ionicframework.com/docs/components/#navigation for more info on
5
-  Ionic pages and navigation.
6
--->
7
 <ion-header>
1
 <ion-header>
8
 
2
 
9
   <ion-navbar>
3
   <ion-navbar>
10
-    <ion-title>register</ion-title>
4
+    <ion-title>Register</ion-title>
11
   </ion-navbar>
5
   </ion-navbar>
12
 
6
 
13
 </ion-header>
7
 </ion-header>