insight-ui-zcash/public/js/config.js

58 lines
1.5 KiB
JavaScript
Raw Normal View History

2014-01-06 12:34:25 -08:00
'use strict';
//Setting up route
2014-01-27 10:39:59 -08:00
angular.module('insight').config(function($routeProvider) {
$routeProvider.
2014-01-08 06:05:19 -08:00
when('/block/:blockHash', {
2014-01-27 10:39:59 -08:00
templateUrl: '/views/block.html',
title: 'Bitcoin Block '
2014-01-08 06:05:19 -08:00
}).
2014-01-20 13:52:28 -08:00
when('/block-index/:blockHeight', {
controller: 'BlocksController',
templateUrl: '/views/redirect.html'
2014-01-20 13:52:28 -08:00
}).
when('/tx/:txId', {
2014-01-27 10:39:59 -08:00
templateUrl: '/views/transaction.html',
title: 'Bitcoin Transaction '
}).
2014-01-06 12:54:32 -08:00
when('/', {
2014-01-27 10:39:59 -08:00
templateUrl: '/views/index.html',
title: 'Home'
2014-01-06 12:54:32 -08:00
}).
2014-01-08 06:56:36 -08:00
when('/blocks', {
2014-01-31 11:35:51 -08:00
templateUrl: '/views/blocks_list.html',
2014-01-27 10:39:59 -08:00
title: 'Bitcoin Blocks solved Today'
2014-01-08 06:56:36 -08:00
}).
when('/blocks-date/:blockDate', {
2014-01-31 11:35:51 -08:00
templateUrl: '/views/blocks_list.html',
2014-01-27 10:39:59 -08:00
title: 'Bitcoin Blocks solved '
2014-01-08 06:56:36 -08:00
}).
when('/address/:addrStr', {
2014-01-27 10:39:59 -08:00
templateUrl: '/views/address.html',
title: 'Bitcoin Address '
2014-01-10 04:37:18 -08:00
}).
when('/status', {
2014-01-27 10:39:59 -08:00
templateUrl: '/views/status.html',
title: 'Status'
}).
2014-01-06 12:54:32 -08:00
otherwise({
2014-01-27 10:39:59 -08:00
templateUrl: '/views/404.html',
title: 'Error'
2014-01-06 12:54:32 -08:00
});
2014-01-27 10:39:59 -08:00
});
2014-01-06 12:34:25 -08:00
//Setting HTML5 Location Mode
2014-01-27 10:39:59 -08:00
angular.module('insight')
.config(function($locationProvider) {
$locationProvider.html5Mode(true);
2014-01-06 12:54:32 -08:00
$locationProvider.hashPrefix('!');
2014-01-27 10:39:59 -08:00
})
.run(function($rootScope, $route) {
$rootScope.$on('$routeChangeSuccess', function() {
//Change page title, based on Route information
$rootScope.titleDetail = '';
$rootScope.title = $route.current.title;
$rootScope.isCollapsed = true;
2014-01-27 10:39:59 -08:00
});
});