Browse Source

web-ui: Add a the richest addresses to the nav bar

scalafmt-draft
Alexis Hernandez 7 years ago
parent
commit
80509a03ac
  1. 2
      web-ui/src/app/app-routing.module.ts
  2. 9
      web-ui/src/app/components/navbar/navbar.component.ts

2
web-ui/src/app/app-routing.module.ts

@ -5,12 +5,14 @@ import { HomeComponent } from './components/home/home.component';
import { TransactionDetailsComponent } from './components/transaction-details/transaction-details.component';
import { AddressDetailsComponent } from './components/address-details/address-details.component';
import { BlockDetailsComponent } from './components/block-details/block-details.component';
import { RichestAddressesComponent } from './components/richest-addresses/richest-addresses.component';
const routes: Routes = [
{ path: '', component: HomeComponent },
{ path: 'addresses/:address', component: AddressDetailsComponent },
{ path: 'blocks/:blockhash', component: BlockDetailsComponent },
{ path: 'transactions/:txid', component: TransactionDetailsComponent },
{ path: 'richest-addresses', component: RichestAddressesComponent },
{ path: '**', redirectTo: '' }
];

9
web-ui/src/app/components/navbar/navbar.component.ts

@ -1,6 +1,11 @@
import { Component, OnInit } from '@angular/core';
import { Location } from '@angular/common';
class Tab {
label: string;
path: string;
}
@Component({
selector: 'app-navbar',
templateUrl: './navbar.component.html',
@ -8,7 +13,9 @@ import { Location } from '@angular/common';
})
export class NavbarComponent implements OnInit {
public tabs = [];
public tabs: Tab[] = [
{ label: 'label.richestAddresses', path: 'richest-addresses' }
];
constructor(private location: Location) { }

Loading…
Cancel
Save