diff --git a/app/app.core.scss b/app/app.core.scss index 1966da3..ec1a199 100644 --- a/app/app.core.scss +++ b/app/app.core.scss @@ -11,4 +11,4 @@ @import "pages/grid/grid"; -@import "pages/list/list"; +@import "pages/questions/questions"; diff --git a/app/app.ts b/app/app.ts index 69bd640..90ad235 100644 --- a/app/app.ts +++ b/app/app.ts @@ -1,7 +1,7 @@ import {App, IonicApp, Platform} from 'ionic-framework/ionic'; import {TeamPage} from './pages/team/team'; -import {ListPage} from './pages/list/list'; +import {QuestionsPage} from './pages/questions/questions'; import {GridPage} from './pages/grid/grid'; @@ -18,7 +18,7 @@ class MyApp { // used for an example of ngFor and navigation this.pages = [ { title: 'Team', component: TeamPage }, - { title: 'Questions', component: ListPage }, + { title: 'Questions', component: QuestionsPage }, { title: 'Account', component: GridPage }, ]; diff --git a/app/pages/list/list.html b/app/pages/list/list.html deleted file mode 100644 index 7770edf..0000000 --- a/app/pages/list/list.html +++ /dev/null @@ -1,21 +0,0 @@ - - - Lists - - - - - - -
- You navigated here from {{selectedItem.title}} -
-
diff --git a/app/pages/list/list.ts b/app/pages/list/list.ts deleted file mode 100644 index ba4fb2e..0000000 --- a/app/pages/list/list.ts +++ /dev/null @@ -1,32 +0,0 @@ -import {IonicApp, Page, NavController, NavParams} from 'ionic-framework/ionic'; - - -@Page({ - templateUrl: 'build/pages/list/list.html' -}) -export class ListPage { - constructor(app: IonicApp, nav: NavController, navParams: NavParams) { - this.nav = nav; - - // If we navigated to this page, we will have an item available as a nav param - this.selectedItem = navParams.get('item'); - - this.icons = ['flask', 'wifi', 'beer', 'football', 'basketball', 'paper-plane', - 'american-football', 'boat', 'bluetooth', 'build']; - - this.items = []; - for(let i = 1; i < 11; i++) { - this.items.push({ - title: 'Item ' + i, - note: 'This is item #' + i, - icon: this.icons[Math.floor(Math.random() * this.icons.length)] - }); - } - } - - itemTapped(event, item) { - this.nav.push(ListPage, { - item: item - }) - } -} diff --git a/app/pages/questions/questionadd.html b/app/pages/questions/questionadd.html new file mode 100644 index 0000000..dd382c1 --- /dev/null +++ b/app/pages/questions/questionadd.html @@ -0,0 +1,16 @@ + + + + + Add a Question + + + +

I am a modal!

+ + + + +
diff --git a/app/pages/questions/questions.html b/app/pages/questions/questions.html new file mode 100644 index 0000000..b46e279 --- /dev/null +++ b/app/pages/questions/questions.html @@ -0,0 +1,35 @@ + + + Questions + + + + + + Today + + + + + +

Name 1

+

Angular 2 question

+

Please teach me how to properly...

+
+ + + + + +

Name 2

+

Javascript question

+

What's a good way to start up a...

+
+ +
+ + + +
diff --git a/app/pages/list/list.scss b/app/pages/questions/questions.scss similarity index 100% rename from app/pages/list/list.scss rename to app/pages/questions/questions.scss diff --git a/app/pages/questions/questions.ts b/app/pages/questions/questions.ts new file mode 100644 index 0000000..3201f94 --- /dev/null +++ b/app/pages/questions/questions.ts @@ -0,0 +1,37 @@ +import {IonicApp, Page, NavController, NavParams, Modal, Platform} from 'ionic-framework/ionic'; +import {QuestionsDetail} from './questionsdetail'; + +@Page({ + templateUrl: 'build/pages/questions/questions.html' +}) +export class QuestionsPage { + + constructor(app: IonicApp, nav: NavController, navParams: NavParams, modal: Modal) { + this.nav = nav; + this.modal = modal; + } + + //once clicked, opens up the new screen, take note of the QuestionsDetail + itemTapped(item) { + this.nav.push(QuestionsDetail) + console.log("switch screen"); + } + + //opens the modal, placed here because we are still in the questions page + openModal(item){ + this.modal.open(questionModal); + console.log("Open Modal"); + } + +} + + +//Modal code, the templateUrl directs to the modal template +@Page({ + templateUrl: 'build/pages/questions/questionadd.html' +}) +class questionModal{ + + constructor() { + } +} diff --git a/app/pages/questions/questionsdetail.html b/app/pages/questions/questionsdetail.html new file mode 100644 index 0000000..fdb3586 --- /dev/null +++ b/app/pages/questions/questionsdetail.html @@ -0,0 +1,10 @@ + + + Questions Detail + + + +Hello world + diff --git a/app/pages/questions/questionsdetail.scss b/app/pages/questions/questionsdetail.scss new file mode 100644 index 0000000..e69de29 diff --git a/app/pages/questions/questionsdetail.ts b/app/pages/questions/questionsdetail.ts new file mode 100644 index 0000000..0289e42 --- /dev/null +++ b/app/pages/questions/questionsdetail.ts @@ -0,0 +1,12 @@ +import {IonicApp, Page, NavController, NavParams} from 'ionic-framework/ionic'; + + +@Page({ + templateUrl: 'build/pages/questions/questionsdetail.html' +}) +export class QuestionsDetail { + constructor(app: IonicApp, nav: NavController, navParams: NavParams) { + + } + +}