added block detail page (placeholder)
This commit is contained in:
parent
b5a76aee44
commit
a6ab615a96
19
app/src/pages/block-detail/block-detail.html
Normal file
19
app/src/pages/block-detail/block-detail.html
Normal file
@ -0,0 +1,19 @@
|
||||
<!--
|
||||
Generated template for the BlockDetailPage page.
|
||||
|
||||
See http://ionicframework.com/docs/components/#navigation for more info on
|
||||
Ionic pages and navigation.
|
||||
-->
|
||||
<ion-header>
|
||||
|
||||
<ion-navbar>
|
||||
<ion-title>BlockDetail</ion-title>
|
||||
</ion-navbar>
|
||||
|
||||
</ion-header>
|
||||
|
||||
|
||||
<ion-content padding>
|
||||
Hey, here's where the BlockDetail should go.
|
||||
|
||||
</ion-content>
|
||||
16
app/src/pages/block-detail/block-detail.module.ts
Normal file
16
app/src/pages/block-detail/block-detail.module.ts
Normal file
@ -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 {}
|
||||
3
app/src/pages/block-detail/block-detail.scss
Normal file
3
app/src/pages/block-detail/block-detail.scss
Normal file
@ -0,0 +1,3 @@
|
||||
page-block-detail {
|
||||
|
||||
}
|
||||
26
app/src/pages/block-detail/block-detail.ts
Normal file
26
app/src/pages/block-detail/block-detail.ts
Normal file
@ -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');
|
||||
}
|
||||
|
||||
}
|
||||
@ -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();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user