Building with Steem-JS: broken broken broken

in #steemhelp7 years ago
<html ng-app="TempApp">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular.min.js"></script>
<script src="https://cdn.steemjs.com/lib/latest/steem.min.js"></script>
<script>
var app = angular.module('TempApp', []);
app.controller('foo', ['$scope', '$http', '$timeout', '$interval', function ($scope, $http, $timeout, $interval) {            
    console.log("Hello: Getting an account");
    try {
        //steem.api.setOptions({ url: 'https://node.steem.ws' }); // causes an error message: "steem does not exist"
        //steem.config.set('url', 'https://node.steem.ws');
        steem.api.getAccounts(['dan'], function(err, response){
            console.log(err, response);
        });
    } catch (e) {
        console.log($scope.error_message = "Couldn't use the steem b/c from steemjs");
    }
}]);
</script>
</head>
<body ng-controller="foo as main">
<input type=text ng-model='error_message'>
</body>
</html>

https://github.com/steemit/steem-js should tell me how to make my own steem.min.js, if the CDN is not serving the files!

I open up the console and I see " https://cdn.steemjs.com/lib/latest/steem.min.js net::ERR_CONNECTION_REFUSED".

Sort:  

Good, steady, good luck on your success, long life and healthy always, do not forget also my post will remain in steemit

Thanks for the completely useless answer.

I'm using the NPM package since a couple of weeks and never had a problem with using SteemJS.

Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 63811.50
ETH 2617.28
USDT 1.00
SBD 2.77