mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-14 21:43:04 +00:00
65272: EditItemTemplatePageComponent
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Observable } from 'rxjs/internal/Observable';
|
||||
import { RemoteData } from '../../core/data/remote-data';
|
||||
import { Collection } from '../../core/shared/collection.model';
|
||||
import { Item } from '../../core/shared/item.model';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { first, map } from 'rxjs/operators';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-edit-item-template-page',
|
||||
templateUrl: './edit-item-template-page.component.html',
|
||||
})
|
||||
export class EditItemTemplatePageComponent implements OnInit {
|
||||
collectionRD$: Observable<RemoteData<Collection>>;
|
||||
itemRD$: Observable<RemoteData<Item>>;
|
||||
|
||||
constructor(protected route: ActivatedRoute) {
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.collectionRD$ = this.route.parent.data.pipe(first(), map((data) => data.collection));
|
||||
this.itemRD$ = this.route.parent.data.pipe(first(), map((data) => data.item));
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user