69920: Move collection create route on top of ID + fix non-static ViewChild

This commit is contained in:
Kristof De Langhe
2020-03-18 16:12:35 +01:00
parent 5ec544ffea
commit f49007e2f6
2 changed files with 6 additions and 6 deletions

View File

@@ -34,6 +34,11 @@ const COLLECTION_EDIT_PATH = 'edit';
@NgModule({ @NgModule({
imports: [ imports: [
RouterModule.forChild([ RouterModule.forChild([
{
path: COLLECTION_CREATE_PATH,
component: CreateCollectionPageComponent,
canActivate: [AuthenticatedGuard, CreateCollectionPageGuard]
},
{ {
path: ':id', path: ':id',
resolve: { resolve: {
@@ -65,11 +70,6 @@ const COLLECTION_EDIT_PATH = 'edit';
} }
] ]
}, },
{
path: COLLECTION_CREATE_PATH,
component: CreateCollectionPageComponent,
canActivate: [AuthenticatedGuard, CreateCollectionPageGuard]
},
]) ])
], ],
providers: [ providers: [

View File

@@ -39,7 +39,7 @@ export class ComColFormComponent<T extends DSpaceObject> implements OnInit, OnDe
/** /**
* The logo uploader component * The logo uploader component
*/ */
@ViewChild(UploaderComponent, {static: true}) uploaderComponent: UploaderComponent; @ViewChild(UploaderComponent, {static: false}) uploaderComponent: UploaderComponent;
/** /**
* DSpaceObject that the form represents * DSpaceObject that the form represents