added new template and controller for address page
This commit is contained in:
parent
a774a711b3
commit
6d44c9b53a
20
public/js/controllers/address.js
Normal file
20
public/js/controllers/address.js
Normal file
@ -0,0 +1,20 @@
|
||||
'use strict';
|
||||
|
||||
angular.module('mystery.address').controller('AddressController', ['$scope', function ($scope) {
|
||||
|
||||
//example data
|
||||
$scope.address = '1JmTTDcksW7A6GN7JnxuXkMAXsVN9zmgm1';
|
||||
$scope.hash160 = '77ad7d08aaa9cf489ea4e468eaeb892b85f71e27';
|
||||
$scope.transactions = [
|
||||
{
|
||||
hash: '49a1d01759690476dbeec4a8efd969c09c6d4269ea2d88f4d9d4f098f021413c',
|
||||
time: 1234123445,
|
||||
amount: 0.3
|
||||
},
|
||||
{
|
||||
hash: 'cce948b422a4d485900fb82e64458720eb89f545af3f07ddf7d18660f9f881e9',
|
||||
time: 1234123445,
|
||||
amount: 0.1
|
||||
}
|
||||
];
|
||||
}]);
|
||||
60
public/views/address.html
Normal file
60
public/views/address.html
Normal file
@ -0,0 +1,60 @@
|
||||
<section data-ng-controller="AddressController">
|
||||
<div class="page-header">
|
||||
<h1>
|
||||
Address
|
||||
<small>{{address}}</small>
|
||||
</h1>
|
||||
</div>
|
||||
<div class="col-lg-9">
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Address</td>
|
||||
<td><a href="#!/address/{{address}}">{{address}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Hash160</td>
|
||||
<td><a href="#!/address/{{hash160}}">{{hash160}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Total Output</td>
|
||||
<td>1 BTC</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Total Input</td>
|
||||
<td>0.2 BTC</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Current balance</td>
|
||||
<td>10.2 BTC</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<qrcode size="200" data="{{address}}"></qrcode>
|
||||
</div>
|
||||
<div class="col-lg-12">
|
||||
<h3>
|
||||
Transactions
|
||||
<small>transactions this address relates to</small>
|
||||
</h3>
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Transaction Hash</th>
|
||||
<th>Datetime</th>
|
||||
<th>Transacted amount</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr data-ng-repeat="transaction in transactions">
|
||||
<td><a href="#!/tx/{{transaction.hash}}">{{transaction.hash}}</a></td>
|
||||
<td>{{transaction.time | date:'medium'}}</td>
|
||||
<td>{{transaction.amount}} BTC</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
Loading…
Reference in New Issue
Block a user