Going to start trying to get routing working

This commit is contained in:
GloriousCode
2016-07-23 09:57:40 +10:00
parent 1b0c8a8e23
commit 174d715dbb
3 changed files with 17 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
var express = require('express');
var routes = require('./routes');
var app = express();
// set the view engine to ejs

13
web/glorious-web/app.js Normal file
View File

@@ -0,0 +1,13 @@
'use strict';
// Declare app level module which depends on views, and components
angular.module('gocryptoweb', [
'ngRoute',
'gocryptoweb.view1',
'gocryptoweb.view2'
]).
config(['$locationProvider', '$routeProvider', function($locationProvider, $routeProvider) {
$locationProvider.hashPrefix('!');
$routeProvider.otherwise({redirectTo: '/view1'});
}]);

View File

@@ -0,0 +1,3 @@
exports.index = function(req, res){
res.render('layout');
};