diff --git a/app/views/includes/foot.jade b/app/views/includes/foot.jade
index 6c19c86..f25748a 100755
--- a/app/views/includes/foot.jade
+++ b/app/views/includes/foot.jade
@@ -1,4 +1,4 @@
-#footer(data-ng-include="'views/footer.html'", role='navigation')
+#footer(data-ng-include="'/views/footer.html'", role='navigation')
//script(type='text/javascript', src='/lib/jquery/jquery.min.js')
//script(type='text/javascript', src='/lib/bootstrap/dist/js/bootstrap.min.js')
diff --git a/app/views/includes/head.jade b/app/views/includes/head.jade
index d056400..a3ed958 100755
--- a/app/views/includes/head.jade
+++ b/app/views/includes/head.jade
@@ -2,6 +2,7 @@ head
meta(charset='utf-8')
meta(http-equiv='X-UA-Compatible', content='IE=edge,chrome=1')
meta(name='viewport', content='width=device-width,initial-scale=1.0')
+ meta(name="fragment", content="!")
title= appName+' - '+title
meta(http-equiv='Content-type', content='text/html;charset=UTF-8')
diff --git a/app/views/includes/navbar.jade b/app/views/includes/navbar.jade
index a1b2b1c..10463d6 100644
--- a/app/views/includes/navbar.jade
+++ b/app/views/includes/navbar.jade
@@ -1 +1 @@
-.navbar.navbar-default.navbar-fixed-top(data-ng-include="'views/header.html'", role='navigation')
+.navbar.navbar-default.navbar-fixed-top(data-ng-include="'/views/header.html'", role='navigation')
diff --git a/config/express.js b/config/express.js
index 0b9c284..7ac2645 100644
--- a/config/express.js
+++ b/config/express.js
@@ -52,7 +52,6 @@ module.exports = function(app, historicSync) {
//routes should be at the last
app.use(app.router);
-
//Setting the fav icon and static folder
app.use(express.favicon());
app.use(express.static(config.root + '/public'));
diff --git a/config/routes.js b/config/routes.js
index 3c3e198..d7d57d8 100644
--- a/config/routes.js
+++ b/config/routes.js
@@ -4,7 +4,14 @@ module.exports = function(app, historicSync) {
//Home route
var index = require('../app/controllers/index');
+
app.get('/', index.render);
+ app.get('/blocks', index.render);
+ app.get('/blocks-date/*', index.render);
+ app.get('/block/*', index.render);
+ app.get('/tx/*', index.render);
+ app.get('/address/*', index.render);
+
app.get('/api/version', index.version);
//Block routes
@@ -34,5 +41,5 @@ module.exports = function(app, historicSync) {
app.get('/api/status', st.show);
app.get('/api/sync', st.sync);
-
+
};
diff --git a/public/js/config.js b/public/js/config.js
index 9791eb0..eaddc38 100755
--- a/public/js/config.js
+++ b/public/js/config.js
@@ -5,32 +5,32 @@ angular.module('insight').config(['$routeProvider',
function($routeProvider) {
$routeProvider.
when('/block/:blockHash', {
- templateUrl: 'views/block.html'
+ templateUrl: '/views/block.html'
}).
when('/block-index/:blockHeight', {
controller: 'BlocksController',
template: 'Redirecting...'
}).
when('/tx/:txId', {
- templateUrl: 'views/transaction.html'
+ templateUrl: '/views/transaction.html'
}).
when('/', {
- templateUrl: 'views/index.html'
+ templateUrl: '/views/index.html'
}).
when('/blocks', {
- templateUrl: 'views/blocks/list.html'
+ templateUrl: '/views/blocks/list.html'
}).
when('/blocks-date/:blockDate', {
- templateUrl: 'views/blocks/list.html'
+ templateUrl: '/views/blocks/list.html'
}).
when('/address/:addrStr', {
- templateUrl: 'views/address.html'
+ templateUrl: '/views/address.html'
}).
when('/status', {
- templateUrl: 'views/status.html'
+ templateUrl: '/views/status.html'
}).
otherwise({
- templateUrl: 'views/404.html'
+ templateUrl: '/views/404.html'
});
}
]);
@@ -38,6 +38,7 @@ angular.module('insight').config(['$routeProvider',
//Setting HTML5 Location Mode
angular.module('insight').config(['$locationProvider',
function($locationProvider) {
+ $locationProvider.html5Mode(true);
$locationProvider.hashPrefix('!');
}
]);
diff --git a/public/js/directives.js b/public/js/directives.js
index d7c2f8e..9dcaffa 100755
--- a/public/js/directives.js
+++ b/public/js/directives.js
@@ -29,7 +29,7 @@ angular.module('insight')
}])
.directive('clipCopy', [function() {
ZeroClipboard.config({
- moviePath: '../lib/zeroclipboard/ZeroClipboard.swf',
+ moviePath: '/lib/zeroclipboard/ZeroClipboard.swf',
trustedDomains: ['*'],
allowScriptAccess: 'always',
forceHandCursor: true
diff --git a/public/js/init.js b/public/js/init.js
index 5f49071..d0da1d0 100755
--- a/public/js/init.js
+++ b/public/js/init.js
@@ -1,6 +1,6 @@
'use strict';
angular.element(document).ready(function() {
- //Then init the app
+ // Init the app
angular.bootstrap(document, ['insight']);
});
diff --git a/public/views/address.html b/public/views/address.html
index 4c1e953..dc5633a 100644
--- a/public/views/address.html
+++ b/public/views/address.html
@@ -6,7 +6,7 @@
{{pagination.current}}
@@ -37,7 +37,7 @@