Skip to content

Commit

Permalink
when setting the url, use the plain path
Browse files Browse the repository at this point in the history
Fixes #152
  • Loading branch information
Spencer Alger committed Jul 25, 2014
1 parent 7ff55bf commit d10af1e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/kibana/directives/saved_object_finder.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
};

Expand Down

0 comments on commit d10af1e

Please sign in to comment.