summaryrefslogtreecommitdiffstats
path: root/sdc-workflow-designer-ui/src/app
diff options
context:
space:
mode:
Diffstat (limited to 'sdc-workflow-designer-ui/src/app')
-rw-r--r--sdc-workflow-designer-ui/src/app/app.component.ts10
-rw-r--r--sdc-workflow-designer-ui/src/app/app.module.ts2
2 files changed, 10 insertions, 2 deletions
diff --git a/sdc-workflow-designer-ui/src/app/app.component.ts b/sdc-workflow-designer-ui/src/app/app.component.ts
index 59b457f9..29c4d06f 100644
--- a/sdc-workflow-designer-ui/src/app/app.component.ts
+++ b/sdc-workflow-designer-ui/src/app/app.component.ts
@@ -16,6 +16,7 @@ import { WorkflowService } from "./services/workflow.service";
import { WorkflowNode } from "./model/workflow-node";
import { Workflow } from "./model/workflow";
import { DataAccessService } from "./services/data-access/data-access.service";
+import { ActivatedRoute } from "@angular/router";
@Component({
selector: 'app-root',
@@ -25,11 +26,16 @@ import { DataAccessService } from "./services/data-access/data-access.service";
export class AppComponent implements AfterViewInit, OnInit {
constructor(private jsplumbService: JsPlumbService,
private dataAccessService: DataAccessService,
+ private route: ActivatedRoute,
private workflowService: WorkflowService) {}
ngOnInit(): void {
- this.dataAccessService.catalogService.loadWorkflow('workflow1').subscribe(workflow => {
- this.workflowService.workflow = workflow;
+ this.route.queryParams.subscribe(params => {
+ if(params.id) {
+ this.dataAccessService.catalogService.loadWorkflow(params.id).subscribe(workflow => {
+ this.workflowService.workflow = workflow;
+ });
+ }
});
}
diff --git a/sdc-workflow-designer-ui/src/app/app.module.ts b/sdc-workflow-designer-ui/src/app/app.module.ts
index 616db2dd..8d92d0ae 100644
--- a/sdc-workflow-designer-ui/src/app/app.module.ts
+++ b/sdc-workflow-designer-ui/src/app/app.module.ts
@@ -24,6 +24,7 @@ import { SharedModule } from "./shared/shared.module";
import { InMemoryWebApiModule } from "angular-in-memory-web-api";
import { InMemoryDataService } from "./services/data-access/in-memory-data.service";
import { HttpModule } from "@angular/http";
+import { RouterModule } from "@angular/router";
@NgModule({
declarations: [
@@ -35,6 +36,7 @@ import { HttpModule } from "@angular/http";
BrowserModule,
HttpModule,
InMemoryWebApiModule.forRoot(InMemoryDataService),
+ RouterModule.forRoot([]),
SharedModule,
],
providers: [