From 1dafe92bea6708a78a78bc5cf02699644539fe02 Mon Sep 17 00:00:00 2001 From: Alexis Hernandez Date: Sat, 17 Mar 2018 18:01:10 -0600 Subject: [PATCH] web-ui: Add the AddressDetails view --- web-ui/src/app/app-routing.module.ts | 2 ++ web-ui/src/app/app.module.ts | 4 ++- .../address-details.component.css | 0 .../address-details.component.html | 3 +++ .../address-details.component.spec.ts | 25 +++++++++++++++++++ .../address-details.component.ts | 15 +++++++++++ 6 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 web-ui/src/app/components/address-details/address-details.component.css create mode 100644 web-ui/src/app/components/address-details/address-details.component.html create mode 100644 web-ui/src/app/components/address-details/address-details.component.spec.ts create mode 100644 web-ui/src/app/components/address-details/address-details.component.ts diff --git a/web-ui/src/app/app-routing.module.ts b/web-ui/src/app/app-routing.module.ts index 8f483b1..83cd11e 100644 --- a/web-ui/src/app/app-routing.module.ts +++ b/web-ui/src/app/app-routing.module.ts @@ -3,9 +3,11 @@ import { Routes, RouterModule } from '@angular/router'; 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'; const routes: Routes = [ { path: '', component: HomeComponent }, + { path: 'addresses/:address', component: AddressDetailsComponent }, { path: 'transactions/:txid', component: TransactionDetailsComponent }, { path: '**', redirectTo: '' } ]; diff --git a/web-ui/src/app/app.module.ts b/web-ui/src/app/app.module.ts index 6637fb0..cf1e4b2 100644 --- a/web-ui/src/app/app.module.ts +++ b/web-ui/src/app/app.module.ts @@ -24,6 +24,7 @@ import { FooterComponent } from './components/footer/footer.component'; import { NavbarComponent } from './components/navbar/navbar.component'; import { TransactionDetailsComponent } from './components/transaction-details/transaction-details.component'; import { TransactionFinderComponent } from './components/transaction-finder/transaction-finder.component'; +import { AddressDetailsComponent } from './components/address-details/address-details.component'; @NgModule({ declarations: [ @@ -32,7 +33,8 @@ import { TransactionFinderComponent } from './components/transaction-finder/tran FooterComponent, NavbarComponent, TransactionDetailsComponent, - TransactionFinderComponent + TransactionFinderComponent, + AddressDetailsComponent ], imports: [ AppRoutingModule, diff --git a/web-ui/src/app/components/address-details/address-details.component.css b/web-ui/src/app/components/address-details/address-details.component.css new file mode 100644 index 0000000..e69de29 diff --git a/web-ui/src/app/components/address-details/address-details.component.html b/web-ui/src/app/components/address-details/address-details.component.html new file mode 100644 index 0000000..b29656f --- /dev/null +++ b/web-ui/src/app/components/address-details/address-details.component.html @@ -0,0 +1,3 @@ +

+ address-details works! +

diff --git a/web-ui/src/app/components/address-details/address-details.component.spec.ts b/web-ui/src/app/components/address-details/address-details.component.spec.ts new file mode 100644 index 0000000..c2be6d3 --- /dev/null +++ b/web-ui/src/app/components/address-details/address-details.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AddressDetailsComponent } from './address-details.component'; + +describe('AddressDetailsComponent', () => { + let component: AddressDetailsComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ AddressDetailsComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(AddressDetailsComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/web-ui/src/app/components/address-details/address-details.component.ts b/web-ui/src/app/components/address-details/address-details.component.ts new file mode 100644 index 0000000..d6667b1 --- /dev/null +++ b/web-ui/src/app/components/address-details/address-details.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-address-details', + templateUrl: './address-details.component.html', + styleUrls: ['./address-details.component.css'] +}) +export class AddressDetailsComponent implements OnInit { + + constructor() { } + + ngOnInit() { + } + +}