Files
gocryptotrader/web/app/views/settings/settings.js
GloriousCode df295a122c Removes "/web" folder requirement when running app.
[WIP]Adds config route to modify settings within app.
2016-07-27 19:09:08 +10:00

28 lines
635 B
JavaScript

'use strict';
angular.module('myApp.home', ['ngRoute'])
.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/', {
templateUrl: '/views/home/home.html',
controller: 'HomeController'
});
}])
.controller('HomeController', function ($scope, $http) {
$scope.getDashboardData = function() {
$http({
method: 'GET',
url: '/data/all-enabled-currencies'
}).
success(function (data, status, headers, config) {
$scope.exchanges = data.data;
}).
error(function (data, status, headers, config) {
console.log('error');
});
};
$scope.getDashboardData();
});