stackviz/app/js/on_config.js
Tim Buckley 756d281ee4 Allow sharing of selected item by page URL.
This patch adds the ability for users to share a selected timeline
item via the page URL. When an item is selected, the page address
is updated to include the current test name as a parameter. If
this link is shared, the test named in the URL will automatically
be highlighed when the page is loaded.

Change-Id: I228d58e68ee986f621a3763bba1a565300c79023
2015-11-30 16:39:45 -07:00

29 lines
577 B
JavaScript

'use strict';
/**
* @ngInject
*/
function OnConfig($stateProvider, $locationProvider, $urlRouterProvider) {
$stateProvider.state('home', {
url: '/{datasetId:int}',
params: { datasetId: 0 },
controller: 'HomeCtrl as home',
templateUrl: 'home.html',
title: 'Home'
});
$stateProvider.state('timeline', {
url: '/{datasetId:int}/timeline?test',
controller: 'TimelineCtrl as timeline',
templateUrl: 'timeline.html',
reloadOnSearch: false,
title: 'Timeline'
});
$urlRouterProvider.otherwise('/');
}
module.exports = OnConfig;