# HG changeset patch # User casties # Date 1490724216 -7200 # Node ID b22e52a128a8c3f9220f94e3bac6d84da54c8e7c # Parent 308c96f734c85abec82a0576be9844bdd7f3df9e query from url fragment works now somewhat (only for id_is). diff -r 308c96f734c8 -r b22e52a128a8 src/app/query-app.component.ts --- a/src/app/query-app.component.ts Mon Mar 27 14:17:55 2017 +0200 +++ b/src/app/query-app.component.ts Tue Mar 28 20:03:36 2017 +0200 @@ -41,16 +41,20 @@ this._queryService.setup(newState); this.queryStepList = []; if (this._queryService.state.getNumSteps() > 0) { + // use state from URL this._queryService.state.steps .forEach((elem) => this.queryStepList.push('param')); + } else { + // new empty state + this.addQueryStep(); } - this.addQueryStep(); } getStateStringFromFragment(): string { let hash: string = window.location.hash; if (hash) { let frag: string = hash.substr(1); + frag = decodeURIComponent(frag); // base64 decode return frag; } diff -r 308c96f734c8 -r b22e52a128a8 src/app/query-select.component.ts --- a/src/app/query-select.component.ts Mon Mar 27 14:17:55 2017 +0200 +++ b/src/app/query-select.component.ts Tue Mar 28 20:03:36 2017 +0200 @@ -17,7 +17,8 @@
@@ -98,8 +99,12 @@ setup() { console.log("query-select setup step=", this.queryStep); - var step = this._queryService.state.steps[this.index-1]; + var step = this._queryService.state.steps[this.index]; // i-1? if (step != null) { + this.selectedMode = step.mode; + if (step.mode.id === 'id_is') { + this.queryInput = step.params.value; + } this.resultInfo = step.resultInfo; } }