diff --git a/app/src/pages/block-detail/block-detail.html b/app/src/pages/block-detail/block-detail.html new file mode 100644 index 0000000..9e03520 --- /dev/null +++ b/app/src/pages/block-detail/block-detail.html @@ -0,0 +1,19 @@ + + + + + BlockDetail + + + + + + + Hey, here's where the BlockDetail should go. + + diff --git a/app/src/pages/block-detail/block-detail.module.ts b/app/src/pages/block-detail/block-detail.module.ts new file mode 100644 index 0000000..7e8158f --- /dev/null +++ b/app/src/pages/block-detail/block-detail.module.ts @@ -0,0 +1,16 @@ +import { NgModule } from '@angular/core'; +import { IonicPageModule } from 'ionic-angular'; +import { BlockDetailPage } from './block-detail'; + +@NgModule({ + declarations: [ + BlockDetailPage, + ], + imports: [ + IonicPageModule.forChild(BlockDetailPage), + ], + exports: [ + BlockDetailPage + ] +}) +export class BlockDetailPageModule {} diff --git a/app/src/pages/block-detail/block-detail.scss b/app/src/pages/block-detail/block-detail.scss new file mode 100644 index 0000000..95a60c5 --- /dev/null +++ b/app/src/pages/block-detail/block-detail.scss @@ -0,0 +1,3 @@ +page-block-detail { + +} diff --git a/app/src/pages/block-detail/block-detail.ts b/app/src/pages/block-detail/block-detail.ts new file mode 100644 index 0000000..7eadcc0 --- /dev/null +++ b/app/src/pages/block-detail/block-detail.ts @@ -0,0 +1,26 @@ +import { Component } from '@angular/core'; +import { IonicPage, NavController, NavParams } from 'ionic-angular'; + +/** + * Generated class for the BlockDetailPage page. + * + * See http://ionicframework.com/docs/components/#navigation for more info + * on Ionic pages and navigation. + */ +@IonicPage({ + name: 'block-detail' +}) +@Component({ + selector: 'page-block-detail', + templateUrl: 'block-detail.html', +}) +export class BlockDetailPage { + + constructor(public navCtrl: NavController, public navParams: NavParams) { + } + + ionViewDidLoad() { + console.log('ionViewDidLoad BlockDetailPage'); + } + +} diff --git a/app/src/pages/blocksPage/blocksPage.ts b/app/src/pages/blocksPage/blocksPage.ts index ba56dba..ba7d58d 100644 --- a/app/src/pages/blocksPage/blocksPage.ts +++ b/app/src/pages/blocksPage/blocksPage.ts @@ -16,8 +16,7 @@ export class BlocksPage { public q: string; public badQuery: boolean = false; - constructor(private nav: NavController, private http: Http, private blocksService: BlocksService) { - this.nav = nav; + constructor(public navCtrl: NavController, private http: Http, private blocksService: BlocksService) { this.title = 'Blocks'; this.blocks = blocksService.latestBlocks; // this.blocks.subscribe((blocks) => { @@ -48,10 +47,11 @@ export class BlocksPage { }, (err) => { this.http.get(apiPrefix + 'block-index/' + this.q).subscribe( - (data) => { + function (data) { this.resetSearch(); console.log('block-index', data); - }, + this.navCtrl.push('block-detail'); + }.bind(this), function (err) { this.loading = false; this.reportBadQuery();