I should have it now. But cannot check it out due to lack of CDN connetivity

This commit is contained in:
GloriousCode
2016-07-23 12:55:58 +10:00
parent 174d715dbb
commit 5176a10b45
6 changed files with 41 additions and 8 deletions

4
.gitignore vendored
View File

@@ -1 +1,3 @@
config.json
config.json
node_modules
lib

View File

@@ -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('!');

View File

@@ -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
});

View File

@@ -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);
};

View File

@@ -1,7 +1,7 @@
<!-- views/pages/index.ejs -->
<!DOCTYPE html>
<html lang="en">
<html lang="en" ng-app="gocryptoweb">
<head>
<% include ../partials/head %>
</head>
@@ -12,9 +12,9 @@
</header>
<main>
<div class="jumbotron">
<h1>Hello world!</h1>
<div class="jumbotron" ng-controller="HomeController">
{{working}}
</div>
</main>

View File

@@ -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>