From f49007e2f65ed51e4283c9dd9fc2cbfc3a0639bd Mon Sep 17 00:00:00 2001 From: Kristof De Langhe Date: Wed, 18 Mar 2020 16:12:35 +0100 Subject: [PATCH] 69920: Move collection create route on top of ID + fix non-static ViewChild --- .../+collection-page/collection-page-routing.module.ts | 10 +++++----- .../comcol-forms/comcol-form/comcol-form.component.ts | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/+collection-page/collection-page-routing.module.ts b/src/app/+collection-page/collection-page-routing.module.ts index 61cfda0d9e..353e3ee9f2 100644 --- a/src/app/+collection-page/collection-page-routing.module.ts +++ b/src/app/+collection-page/collection-page-routing.module.ts @@ -34,6 +34,11 @@ const COLLECTION_EDIT_PATH = 'edit'; @NgModule({ imports: [ RouterModule.forChild([ + { + path: COLLECTION_CREATE_PATH, + component: CreateCollectionPageComponent, + canActivate: [AuthenticatedGuard, CreateCollectionPageGuard] + }, { path: ':id', resolve: { @@ -65,11 +70,6 @@ const COLLECTION_EDIT_PATH = 'edit'; } ] }, - { - path: COLLECTION_CREATE_PATH, - component: CreateCollectionPageComponent, - canActivate: [AuthenticatedGuard, CreateCollectionPageGuard] - }, ]) ], providers: [ diff --git a/src/app/shared/comcol-forms/comcol-form/comcol-form.component.ts b/src/app/shared/comcol-forms/comcol-form/comcol-form.component.ts index 35c6f50969..f8199d2aad 100644 --- a/src/app/shared/comcol-forms/comcol-form/comcol-form.component.ts +++ b/src/app/shared/comcol-forms/comcol-form/comcol-form.component.ts @@ -39,7 +39,7 @@ export class ComColFormComponent implements OnInit, OnDe /** * The logo uploader component */ - @ViewChild(UploaderComponent, {static: true}) uploaderComponent: UploaderComponent; + @ViewChild(UploaderComponent, {static: false}) uploaderComponent: UploaderComponent; /** * DSpaceObject that the form represents