Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
fix(query): Active sub view persists on switch.
Browse files Browse the repository at this point in the history
- Switching from Search -> Query maintains the active
  sub view.

Closes #601
  • Loading branch information
Matthew Schranz committed Mar 17, 2015
1 parent 91a5d34 commit 18561bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/scripts/search/search.controllers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ module ngApp.search.controllers {
var stateParams = {};
var f = this.LocationService.filters();
var q = this.LocationService.filter2query(f);
var toTab = this.$state.current.name.split(".")[1];

if (q) {
stateParams = {
Expand All @@ -183,7 +184,7 @@ module ngApp.search.controllers {
};
}

this.$state.go("query.summary", stateParams, { inherit: true });
this.$state.go("query." + toTab, stateParams, { inherit: true });
}

}
Expand Down

0 comments on commit 18561bd

Please sign in to comment.