From 9fae2db04a65b7279b1f7a9c02015dff8c4d825f Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Tue, 16 Jun 2015 13:16:55 -0700 Subject: [PATCH] [Addressability] Infer ROOT Treat the path element for the root domain object as implicit, such that it does not appear in the full URL. WTD-1149. --- platform/commonUI/browse/src/BrowseController.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/platform/commonUI/browse/src/BrowseController.js b/platform/commonUI/browse/src/BrowseController.js index 83f5b4061c..9bd118e458 100644 --- a/platform/commonUI/browse/src/BrowseController.js +++ b/platform/commonUI/browse/src/BrowseController.js @@ -29,7 +29,8 @@ define( function () { "use strict"; - var DEFAULT_PATH = "ROOT/mine"; + var ROOT_ID = "ROOT", + DEFAULT_PATH = "mine"; /** * The BrowseController is used to populate the initial scope in Browse @@ -41,7 +42,9 @@ define( * @constructor */ function BrowseController($scope, $routeParams, objectService, navigationService) { - var path = ($routeParams.ids || DEFAULT_PATH).split("/"); + var path = [ROOT_ID].concat( + ($routeParams.ids || DEFAULT_PATH).split("/") + ); // Callback for updating the in-scope reference to the object // that is currently navigated-to.