Przeglądaj źródła

linked login and register buttons to their respective pages

Kris Blassingame 6 lat temu
rodzic
commit
338799485c

+ 9
- 2
frontEnd/src/app/app.module.ts Wyświetl plik

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

+ 5
- 5
frontEnd/src/pages/home/home.html Wyświetl plik

@@ -9,16 +9,16 @@
9 9
     <ion-item class="password">
10 10
       <ion-input type="password" placeholder="Password"></ion-input>
11 11
     </ion-item>
12
-    <button ion-button block>
12
+    <button ion-button block (click)="login()">
13 13
       <b>Login</b>
14 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 19
     <p>Forgot Username/Password?
20 20
       <b>Tap here!</b>
21 21
     </p>
22
-    
22
+
23 23
   </div>
24 24
 </ion-content>

+ 10
- 0
frontEnd/src/pages/home/home.ts Wyświetl plik

@@ -1,5 +1,7 @@
1 1
 import { Component } from '@angular/core';
2 2
 import { NavController } from 'ionic-angular';
3
+import { LoginPage } from '../login/login';
4
+import { RegisterPage } from '../register/register';
3 5
 
4 6
 @Component({
5 7
   selector: 'page-home',
@@ -11,4 +13,12 @@ export class HomePage {
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 Wyświetl plik

@@ -1,13 +1,7 @@
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 1
 <ion-header>
8 2
 
9 3
   <ion-navbar>
10
-    <ion-title>login</ion-title>
4
+    <ion-title>Login</ion-title>
11 5
   </ion-navbar>
12 6
 
13 7
 </ion-header>

+ 1
- 7
frontEnd/src/pages/register/register.html Wyświetl plik

@@ -1,13 +1,7 @@
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 1
 <ion-header>
8 2
 
9 3
   <ion-navbar>
10
-    <ion-title>register</ion-title>
4
+    <ion-title>Register</ion-title>
11 5
   </ion-navbar>
12 6
 
13 7
 </ion-header>