From 9013bb74f79f1c1f9f3a0033d1f02c8c27d92ec5 Mon Sep 17 00:00:00 2001 From: Sebastian Stehle Date: Mon, 18 Dec 2017 00:43:31 +0100 Subject: [PATCH] Redirect directly to new schema.. --- .../features/schemas/pages/schemas/schemas-page.component.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Squidex/app/features/schemas/pages/schemas/schemas-page.component.ts b/src/Squidex/app/features/schemas/pages/schemas/schemas-page.component.ts index bc8cd4bdb..6b6b692a0 100644 --- a/src/Squidex/app/features/schemas/pages/schemas/schemas-page.component.ts +++ b/src/Squidex/app/features/schemas/pages/schemas/schemas-page.component.ts @@ -6,6 +6,7 @@ */ import { Component, OnDestroy, OnInit } from '@angular/core'; +import { Router } from '@angular/router'; import { FormControl } from '@angular/forms'; import { Subscription } from 'rxjs'; @@ -51,6 +52,7 @@ export class SchemasPageComponent implements OnDestroy, OnInit { public import: any; constructor(public readonly ctx: AppContext, + private readonly router: Router, private readonly schemasService: SchemasService ) { } @@ -117,6 +119,8 @@ export class SchemasPageComponent implements OnDestroy, OnInit { this.emitSchemaCreated(schema); this.addSchemaDialog.hide(); + + this.router.navigate([ schema.name ], { relativeTo: this.ctx.route }); } private emitSchemaCreated(schema: SchemaDto) {