arnaucube
arnaucube/goBlockchainDataAnalysisPublic Self-hosted repository
goBlockchainDataAnalysis/web/views/address/address.js
web/views/address/address.jsRaw
 1'use strict';
 2
 3angular.module('app.address', ['ngRoute'])
 4
 5    .config(['$routeProvider', function($routeProvider) {
 6        $routeProvider.when('/address/:hash', {
 7            templateUrl: 'views/address/address.html',
 8            controller: 'AddressCtrl'
 9        });
10    }])
11
12    .controller('AddressCtrl', function($scope, $http, $routeParams) {
13        $scope.address = {};
14        $http.get(urlapi + 'address/' + $routeParams.hash)
15            .then(function(data, status, headers, config) {
16                console.log(data);
17                $scope.address = data.data;
18            }, function(data, status, headers, config) {
19                console.log('data error');
20            });
21    });