[Browse] Specify default selection in a constant

https://github.com/nasa/openmctweb/issues/401
This commit is contained in:
Victor Woeltjen
2015-12-11 12:31:06 -08:00
parent 89a93e2966
commit 5f7f349f29
3 changed files with 45 additions and 54 deletions

View File

@ -30,8 +30,7 @@ define(
function () {
"use strict";
var ROOT_ID = "ROOT",
DEFAULT_PATH = "mine";
var ROOT_ID = "ROOT";
/**
* The BrowseController is used to populate the initial scope in Browse
@ -43,9 +42,17 @@ define(
* @memberof platform/commonUI/browse
* @constructor
*/
function BrowseController($scope, $route, $location, objectService, navigationService, urlService) {
function BrowseController(
$scope,
$route,
$location,
objectService,
navigationService,
urlService,
defaultPath
) {
var path = [ROOT_ID].concat(
($route.current.params.ids || DEFAULT_PATH).split("/")
($route.current.params.ids || defaultPath).split("/")
);
function updateRoute(domainObject) {