Skip to content

Instantly share code, notes, and snippets.

@blackjack-8
Last active February 23, 2016 10:45
Show Gist options
  • Save blackjack-8/374ba04b66d5bc45ac75 to your computer and use it in GitHub Desktop.
Save blackjack-8/374ba04b66d5bc45ac75 to your computer and use it in GitHub Desktop.
ramen with angular
$scope.initOrderBook = function (tradingPair) {
APIConnector.setDetails('customHttp', 'GET', 'Public/MarketDepth/' + $scope.tradeCurrencyPair);
APIConnector.send().then(function (data) {
$scope.orderBook = data.orderBook;
initRamen();
})
};
function initRamen(){
//The user name and id(alias & userID) will always be same for each user
var user = {
name: $scope.profile.alias,
id: $scope.profile.userID,
email: $scope.profile.alias + "@gatecoin.com"
};
var question_id = $filter('translate')("question_id");
Ramen.init.update({user: user, question_id: question_id});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment