From ce9caa7488fd1dc04dee47ad5de56ebc23651c22 Mon Sep 17 00:00:00 2001 From: Spencer Alger Date: Fri, 25 Jul 2014 00:42:48 -0700 Subject: [PATCH] when setting the url, use the plain path Fixes #152 --- src/kibana/directives/saved_object_finder.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/kibana/directives/saved_object_finder.js b/src/kibana/directives/saved_object_finder.js index 9325e2cd756bd..fe196455f57eb 100644 --- a/src/kibana/directives/saved_object_finder.js +++ b/src/kibana/directives/saved_object_finder.js @@ -83,12 +83,14 @@ define(function (require) { var url = $scope.makeUrl(hit); if (!url || url.charAt(0) !== '#') return; + // angular wants the '/path', not '#/path' var path = url.substr(1); if ($route.matches(path)) { $event.preventDefault(); + // change works with paths, but we are only here because the paths - // are the same, so we have to change the whole url - $route.changeUrl(url); + // are the same, so we have to change the whole url to be the new path + $route.changeUrl(path); } };