You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.2 KiB

  1. 'use strict';
  2. angular.module('app.address', ['ngRoute'])
  3. .config(['$routeProvider', function($routeProvider) {
  4. $routeProvider.when('/address/:hash', {
  5. templateUrl: 'views/address/address.html',
  6. controller: 'AddressCtrl'
  7. });
  8. }])
  9. .controller('AddressCtrl', function($scope, $http, $routeParams) {
  10. $scope.address = {};
  11. $http.get(urlapi + 'address/' + $routeParams.hash)
  12. .then(function(data, status, headers, config) {
  13. console.log(data);
  14. $scope.address = data.data;
  15. }, function(data, status, headers, config) {
  16. console.log('data error');
  17. });
  18. $scope.addresstimechart= {
  19. data:[],
  20. labels: []
  21. };
  22. $http.get(urlapi + 'addresstimechart/' + $routeParams.hash)
  23. .then(function(data, status, headers, config) {
  24. console.log(data);
  25. $scope.addresstimechart.data = data.data.data;
  26. $scope.addresstimechart.labels = data.data.labels;
  27. }, function(data, status, headers, config) {
  28. console.log('data error');
  29. });
  30. });