William Simkins před 6 roky
rodič
revize
6a9f4455d9

+ 3
- 0
src/app/app.module.ts Zobrazit soubor

@@ -7,6 +7,7 @@ import { AboutPage } from '../pages/about/about';
7 7
 import { ContactPage } from '../pages/contact/contact';
8 8
 import { HomePage } from '../pages/home/home';
9 9
 import { TopicPage } from '../pages/topic/topic';
10
+import { CreateTopicPage } from '../pages/create-topic/create-topic';
10 11
 import { TabsPage } from '../pages/tabs/tabs';
11 12
 
12 13
 import { StatusBar } from '@ionic-native/status-bar';
@@ -19,6 +20,7 @@ import { SplashScreen } from '@ionic-native/splash-screen';
19 20
     ContactPage,
20 21
     HomePage,
21 22
     TopicPage,
23
+    CreateTopicPage,
22 24
     TabsPage
23 25
   ],
24 26
   imports: [
@@ -32,6 +34,7 @@ import { SplashScreen } from '@ionic-native/splash-screen';
32 34
     ContactPage,
33 35
     HomePage,
34 36
     TopicPage,
37
+    CreateTopicPage,
35 38
     TabsPage
36 39
   ],
37 40
   providers: [

+ 29
- 0
src/pages/create-topic/create-topic.html Zobrazit soubor

@@ -0,0 +1,29 @@
1
+<!--
2
+  Generated template for the CreateTopicPage page.
3
+
4
+  See http://ionicframework.com/docs/components/#navigation for more info on
5
+  Ionic pages and navigation.
6
+-->
7
+<ion-header>
8
+
9
+  <ion-navbar>
10
+    <ion-title>createTopic</ion-title>
11
+  </ion-navbar>
12
+
13
+</ion-header>
14
+
15
+
16
+<ion-content padding="true" class="has-header">
17
+  <form id="createATopic-form6" class="list">
18
+    <label class="item item-input" id="createATopic-input9">
19
+      <input type="text" placeholder="Topic Name">
20
+    </label>
21
+    <div class="spacer" style="width: 300px; height: 35px;"></div>
22
+    <label class="item item-input" id="createATopic-textarea3" name="Description">
23
+      <span class="input-label"></span><textarea placeholder="Description of Topic"></textarea></label>
24
+    <div class="spacer" style="width: 300px; height: 38px;"></div>
25
+    <label class="item item-input" id="createATopic-textarea4" name="Advice and Strategies">
26
+      <span class="input-label"></span><textarea placeholder="Advice and Strategies"></textarea></label>
27
+  </form>
28
+  <a ui-sref="topics()" id="createATopic-button11" class="button button-calm button-block">Save Topic</a>
29
+</ion-content>

+ 13
- 0
src/pages/create-topic/create-topic.module.ts Zobrazit soubor

@@ -0,0 +1,13 @@
1
+import { NgModule } from '@angular/core';
2
+import { IonicPageModule } from 'ionic-angular';
3
+import { CreateTopicPage } from './create-topic';
4
+
5
+@NgModule({
6
+  declarations: [
7
+    CreateTopicPage,
8
+  ],
9
+  imports: [
10
+    IonicPageModule.forChild(CreateTopicPage),
11
+  ],
12
+})
13
+export class CreateTopicPageModule {}

+ 3
- 0
src/pages/create-topic/create-topic.scss Zobrazit soubor

@@ -0,0 +1,3 @@
1
+page-create-topic {
2
+
3
+}

+ 25
- 0
src/pages/create-topic/create-topic.ts Zobrazit soubor

@@ -0,0 +1,25 @@
1
+import { Component } from '@angular/core';
2
+import { IonicPage, NavController, NavParams } from 'ionic-angular';
3
+
4
+/**
5
+ * Generated class for the CreateTopicPage page.
6
+ *
7
+ * See https://ionicframework.com/docs/components/#navigation for more info on
8
+ * Ionic pages and navigation.
9
+ */
10
+
11
+@IonicPage()
12
+@Component({
13
+  selector: 'page-create-topic',
14
+  templateUrl: 'create-topic.html',
15
+})
16
+export class CreateTopicPage {
17
+
18
+  constructor(public navCtrl: NavController, public navParams: NavParams) {
19
+  }
20
+
21
+  ionViewDidLoad() {
22
+    console.log('ionViewDidLoad CreateTopicPage');
23
+  }
24
+
25
+}

+ 2
- 0
src/pages/topic/topic.html Zobrazit soubor

@@ -13,6 +13,8 @@
13 13
 </ion-header>
14 14
 
15 15
 <ion-content padding="true" class="has-header">
16
+  <a (click)="createTopic()" class="button">Create Topic</a>
17
+
16 18
   <form id="topics-form5" class="list">
17 19
     <label class="item item-input" id="topics-search1">
18 20
       <i class="icon ion-search placeholder-icon"></i>

+ 5
- 0
src/pages/topic/topic.ts Zobrazit soubor

@@ -1,5 +1,6 @@
1 1
 import { Component } from '@angular/core';
2 2
 import { IonicPage, NavController, NavParams } from 'ionic-angular';
3
+import { CreateTopicPage } from './../create-topic/create-topic';
3 4
 
4 5
 /**
5 6
  * Generated class for the TopicPage page.
@@ -22,4 +23,8 @@ export class TopicPage {
22 23
     console.log('ionViewDidLoad TopicPage');
23 24
   }
24 25
 
26
+  createTopic(){
27
+    this.navCtrl.push(CreateTopicPage);
28
+  }
29
+
25 30
 }