JSFiddle - React, Tailwind, and code Playground

by neptune001

HTML

<div ng-app="AppName">
<div ui-view></div>
</div>

<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.0/angular-resource.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.18/angular-ui-router.min.js"></script>

JavaScript

angular.module('AppName', ['ngResource', 'ui.router'])

.config(function($stateProvider, $urlRouterProvider) {

  $stateProvider.state('home', {
    url: '/',
    template: '{{wallets}}',
    controller: 'OneController',
     resolve: { 
         data: function(Wallets){ return Wallets; },
     }
  });

  $urlRouterProvider.otherwise('/');

})

     
.factory('DogeBalance', ['$resource', function ($resource) {
    return $resource("https://dogechain.info/api/v1/address/balance/:address");
}])


.factory('Wallets', ['DogeBalance', function(DogeBalance) {
    
    var wallets = [
        { id: 0, type: 'doge', address: 'DT2rmMrutwzdZ8EXwzj4QFdcL6DtvGGkci', balance: DogeBalance.get({address:'DT2rmMrutwzdZ8EXwzj4QFdcL6DtvGGkci'})},
        { id: 1, type: 'doge', address: 'DMoonjyH1aHLZc1kksmikBUhjXromn1ZN4', balance: DogeBalance.get({address:'DMoonjyH1aHLZc1kksmikBUhjXromn1ZN4'})}
    ];

    return wallets
}])

.controller('OneController', function($scope, data) {
    $scope.wallets = data;
});