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.

24 lines
665 B

  1. 'use strict';
  2. angular.module('app.blocks', ['ngRoute'])
  3. .config(['$routeProvider', function($routeProvider) {
  4. $routeProvider.when('/blocks', {
  5. templateUrl: 'views/blocks/blocks.html',
  6. controller: 'BlocksCtrl'
  7. });
  8. }])
  9. .controller('BlocksCtrl', function($scope, $http) {
  10. //last tx
  11. $scope.txs = [];
  12. $http.get(urlapi + 'lasttx')
  13. .then(function(data, status, headers, config) {
  14. console.log(data);
  15. $scope.txs = data.data;
  16. }, function(data, status, headers, config) {
  17. console.log('data error');
  18. });
  19. });