Skip to content

Commit

Permalink
I should have it now. But cannot check it out due to lack of CDN conn…
Browse files Browse the repository at this point in the history
…etivity
  • Loading branch information
gloriousCode committed Jul 23, 2016
1 parent 174d715 commit 5176a10
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
config.json
config.json
node_modules
lib
3 changes: 1 addition & 2 deletions web/glorious-web/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
// Declare app level module which depends on views, and components
angular.module('gocryptoweb', [
'ngRoute',
'gocryptoweb.view1',
'gocryptoweb.view2'
'gocryptoweb.controllers'
]).
config(['$locationProvider', '$routeProvider', function($locationProvider, $routeProvider) {
$locationProvider.hashPrefix('!');
Expand Down
23 changes: 23 additions & 0 deletions web/glorious-web/controllers.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
'use strict';

/* Controllers */

angular.module('gocryptoweb.controllers', []).
controller('HomeController', function ($scope, $http) {
$scope.working = true;
$http({
method: 'GET',
url: '/data/all-enabled-currencies'
}).
success(function (data, status, headers, config) {
$scope.exchanges = data.data.exchanges;
}).
error(function (data, status, headers, config) {
console.log('error');
});

}).
controller('MyCtrl1', function ($scope) {
// write Ctrl here

});
9 changes: 9 additions & 0 deletions web/glorious-web/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

exports.index = function(req, res){
res.render('index');
};

exports.partials = function (req, res) {
var name = req.params.name;
res.render('partials/' + name);
};
8 changes: 4 additions & 4 deletions web/glorious-web/views/pages/index.ejs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- views/pages/index.ejs -->

<!DOCTYPE html>
<html lang="en">
<html lang="en" ng-app="gocryptoweb">
<head>
<% include ../partials/head %>
</head>
Expand All @@ -12,9 +12,9 @@
</header>

<main>
<div class="jumbotron">
<h1>Hello world!</h1>

<div class="jumbotron" ng-controller="HomeController">

{{working}}
</div>
</main>

Expand Down
2 changes: 1 addition & 1 deletion web/glorious-web/views/partials/footer.ejs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<!-- views/partials/footer.ejs -->

<p class="text-center text-muted">© Copyright 2016 GoCrypto Trader</p>
<p class="text-center text-muted">Copyright 2016 GoCrypto Trader</p>

0 comments on commit 5176a10

Please sign in to comment.