From 83af41310eabbdc128781f57e42e4f13813ae80f Mon Sep 17 00:00:00 2001 From: Morgan McMillian Date: Sun, 11 Jun 2017 09:44:06 -0700 Subject: [PATCH] remove unused components --- src/app/app.component.ts | 7 ++-- src/app/app.module.ts | 6 ---- src/pages/home/home.html | 19 ---------- src/pages/home/home.scss | 3 -- src/pages/home/home.ts | 35 ------------------ src/pages/list/list.html | 23 ------------ src/pages/list/list.scss | 3 -- src/pages/list/list.ts | 45 ------------------------ src/pages/post-details/post-details.html | 26 -------------- src/pages/post-details/post-details.scss | 3 -- src/pages/post-details/post-details.ts | 22 ------------ 11 files changed, 2 insertions(+), 190 deletions(-) delete mode 100644 src/pages/home/home.html delete mode 100644 src/pages/home/home.scss delete mode 100644 src/pages/home/home.ts delete mode 100644 src/pages/list/list.html delete mode 100644 src/pages/list/list.scss delete mode 100644 src/pages/list/list.ts delete mode 100644 src/pages/post-details/post-details.html delete mode 100644 src/pages/post-details/post-details.scss delete mode 100644 src/pages/post-details/post-details.ts diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 0b26f20..55c5c49 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -4,8 +4,6 @@ import { StatusBar } from '@ionic-native/status-bar'; import { SplashScreen } from '@ionic-native/splash-screen'; import { Storage } from '@ionic/storage'; -// import { HomePage } from '../pages/home/home'; -import { ListPage } from '../pages/list/list'; import { LoginPage } from '../pages/login/login'; import { StreamPage } from '../pages/stream/stream'; @@ -26,9 +24,8 @@ export class MyApp { // used for an example of ngFor and navigation this.pages = [ - { title: 'Global Stream', component: StreamPage, params: {stream: 'global'} }, { title: 'Personal Stream', component: StreamPage, params: {stream: 'personal'} }, - { title: 'List', component: ListPage , params: {}}, + { title: 'Global Stream', component: StreamPage, params: {stream: 'global'} }, ]; } @@ -38,7 +35,7 @@ export class MyApp { this.storage.get('token').then((val) => { if (val.length > 1) { pnut.token = val; - this.nav.setRoot(StreamPage, {stream: 'global'}); + this.nav.setRoot(StreamPage, {stream: 'personal'}); } }).catch(err => { console.log('ERROR: ' + err); diff --git a/src/app/app.module.ts b/src/app/app.module.ts index d0a5089..8b2fc8e 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -3,8 +3,6 @@ import { ErrorHandler, NgModule } from '@angular/core'; import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular'; import { MyApp } from './app.component'; -import { HomePage } from '../pages/home/home'; -import { ListPage } from '../pages/list/list'; import { LoginPage } from '../pages/login/login'; import { StreamPage, NewPostModal } from '../pages/stream/stream'; import { ThreadPage } from '../pages/thread/thread'; @@ -17,8 +15,6 @@ import { TimeagoPipe } from '../pipes/timeago/timeago'; @NgModule({ declarations: [ MyApp, - HomePage, - ListPage, LoginPage, StreamPage, ThreadPage, @@ -33,8 +29,6 @@ import { TimeagoPipe } from '../pipes/timeago/timeago'; bootstrap: [IonicApp], entryComponents: [ MyApp, - HomePage, - ListPage, LoginPage, StreamPage, ThreadPage, diff --git a/src/pages/home/home.html b/src/pages/home/home.html deleted file mode 100644 index d3efca1..0000000 --- a/src/pages/home/home.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - Home - - - - -

Ionic Menu Starter

- -

- If you get lost, the docs will show you the way. -

- - - -
diff --git a/src/pages/home/home.scss b/src/pages/home/home.scss deleted file mode 100644 index d4cc8fc..0000000 --- a/src/pages/home/home.scss +++ /dev/null @@ -1,3 +0,0 @@ -page-home { - -} diff --git a/src/pages/home/home.ts b/src/pages/home/home.ts deleted file mode 100644 index 20f113d..0000000 --- a/src/pages/home/home.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { Component } from '@angular/core'; -import { NavController } from 'ionic-angular'; -import { Storage } from '@ionic/storage'; - -import * as pnut from 'pnut-butter'; - -@Component({ - selector: 'page-home', - templateUrl: 'home.html' -}) -export class HomePage { - - constructor(public navCtrl: NavController, private storage: Storage) { - console.log('*** Created HomePage ***'); - this.fetchMe(); - } - - fetchGlobal() { - console.log('.... going to fetch global maybe ....'); - pnut.global().then(res => { - console.log(res); - }).catch(err => { - console.log(err); - }); - } - - fetchMe() { - pnut.user('me').then(res => { - console.log('RESULT: ' + JSON.stringify(res)); - }).catch( err => { - console.log('ERROR: ' + JSON.stringify(err)); - }); - } - -} diff --git a/src/pages/list/list.html b/src/pages/list/list.html deleted file mode 100644 index 73a63f1..0000000 --- a/src/pages/list/list.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - List - - - - - - - -
- You navigated here from {{selectedItem.title}} -
-
diff --git a/src/pages/list/list.scss b/src/pages/list/list.scss deleted file mode 100644 index d5deafd..0000000 --- a/src/pages/list/list.scss +++ /dev/null @@ -1,3 +0,0 @@ -page-list { - -} diff --git a/src/pages/list/list.ts b/src/pages/list/list.ts deleted file mode 100644 index 8719a95..0000000 --- a/src/pages/list/list.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Component } from '@angular/core'; -import { NavController, NavParams } from 'ionic-angular'; - -import * as pnut from 'pnut-butter'; - -@Component({ - selector: 'page-list', - templateUrl: 'list.html' -}) -export class ListPage { - selectedItem: any; - icons: string[]; - items: Array<{title: string, note: string, icon: string}>; - - constructor(public navCtrl: NavController, public navParams: NavParams) { - console.log('*** created ListPage ***'); - pnut.user('me').then(res => { - console.log('RESULT: ' + JSON.stringify(res)); - }).catch( err => { - console.log('ERROR: ' + JSON.stringify(err)); - }); - // If we navigated to this page, we will have an item available as a nav param - this.selectedItem = navParams.get('item'); - - // Let's populate this page with some filler content for funzies - 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) { - // That's right, we're pushing to ourselves! - this.navCtrl.push(ListPage, { - item: item - }); - } -} diff --git a/src/pages/post-details/post-details.html b/src/pages/post-details/post-details.html deleted file mode 100644 index 7ebc1a0..0000000 --- a/src/pages/post-details/post-details.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - postDetails - - - - - - - - - - Post {{ postData.id }} - -

{{ postData.user.username }}

-

{{ postData.content.text }}

-
-
-
diff --git a/src/pages/post-details/post-details.scss b/src/pages/post-details/post-details.scss deleted file mode 100644 index 5a2326b..0000000 --- a/src/pages/post-details/post-details.scss +++ /dev/null @@ -1,3 +0,0 @@ -page-post-details { - -} diff --git a/src/pages/post-details/post-details.ts b/src/pages/post-details/post-details.ts deleted file mode 100644 index 5fad493..0000000 --- a/src/pages/post-details/post-details.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Component } from '@angular/core'; -import { NavController, NavParams } from 'ionic-angular'; - -/** - * Generated class for the PostDetailsPage page. - * - * See http://ionicframework.com/docs/components/#navigation for more info - * on Ionic pages and navigation. - */ -@Component({ - selector: 'page-post-details', - templateUrl: 'post-details.html', -}) -export class PostDetailsPage { - - postData: Object; - - constructor(public navCtrl: NavController, public navParams: NavParams) { - this.postData = navParams.data.post; - } - -}