Skip to content
Permalink
Browse files

create tokenlist

  • Loading branch information...
elaineo committed Mar 29, 2017
1 parent 5473ebe commit bb1cc61788b91ac23789c41e14acdedcde686208
Showing with 42 additions and 0 deletions.
  1. +12 −0 public/js/controllers/TokenListController.js
  2. +17 −0 public/js/main.js
  3. +13 −0 public/views/tokenlist.html
@@ -0,0 +1,12 @@
angular.module('BlocksApp').controller('TokenListController', function($stateParams, $rootScope, $scope, $http) {
$scope.$on('$viewContentLoaded', function() {
// initialize core components
App.initAjax();
});

$http.get('/TOKENS.json')
.then(function(res){
$scope.tokens = res.data;
})

})
@@ -225,6 +225,23 @@ BlocksApp.config(['$stateProvider', '$urlRouterProvider', function($stateProvide
}]
}
})
.state('tokenlist', {
url: "/token",
templateUrl: "views/tokenlist.html",
data: {pageTitle: 'Tokens'},
controller: "TokenListController",
resolve: {
deps: ['$ocLazyLoad', function($ocLazyLoad) {
return $ocLazyLoad.load({
name: 'BlocksApp',
insertBefore: '#ng_load_plugins_before',
files: [
'/js/controllers/TokenListController.js'
]
});
}]
}
})

.state('token', {
url: "/token/{hash}",
@@ -0,0 +1,13 @@
<div class="row ">
<div class="col-md-12 portlet light">
<div class="portlet-body">

<table class="col-md-6 table">
<tr ng-repeat="t in tokens track by $index">
<td> <a class="font-green" href="/token/{{t.address}}">{{t.name}} ({{t.symbol}})</a> </td>
<td > <a href="/token/{{t.address}}">{{t.address}}</a> </td>
</tr>
</table>
</div>
</div>
</div>

0 comments on commit bb1cc61

Please sign in to comment.
You can’t perform that action at this time.