[Mobile] Back Arrow

Changes URL correctly that
is printed to the console. Is the
url to up one level of objects.
However not navigating to that
object.
This commit is contained in:
Shivam Dave
2015-07-27 17:01:30 -07:00
parent 621ccc25ec
commit b0c42c12b7
6 changed files with 36 additions and 19 deletions

View File

@ -63,10 +63,9 @@ define(
// path to new, addressed, path based on
// domainObject
$location.path(urlService.urlForLocation("browse", domainObject));
}
function backArr(domainObject) {
function backArr() {
var priorRoute = $route.current,
// Act as if params HADN'T changed to avoid page reload
unlisten;
@ -79,13 +78,8 @@ define(
}
unlisten();
});
// urlService.urlForLocation used to adjust current
// path to new, addressed, path based on
// domainObject
var thing = urlService.urlForLocation("browse", domainObject);
$location.path(thing);
console.log(urlService.urlForBack("browse", $scope.navigatedObject));
$location.path(urlService.urlForBack("browse", $scope.navigatedObject));
}
// Callback for updating the in-scope reference to the object