mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
27 lines
609 B
TypeScript
27 lines
609 B
TypeScript
import { Component, OnInit } from '@angular/core';
|
|
import { map } from 'rxjs/operators';
|
|
import { ActivatedRoute } from '@angular/router';
|
|
import { Observable } from 'rxjs';
|
|
import { Site } from '../core/shared/site.model';
|
|
|
|
@Component({
|
|
selector: 'ds-home-page',
|
|
styleUrls: ['./home-page.component.scss'],
|
|
templateUrl: './home-page.component.html'
|
|
})
|
|
export class HomePageComponent implements OnInit {
|
|
|
|
site$:Observable<Site>;
|
|
|
|
constructor(
|
|
private route:ActivatedRoute,
|
|
) {
|
|
}
|
|
|
|
ngOnInit():void {
|
|
this.site$ = this.route.data.pipe(
|
|
map((data) => data.site as Site),
|
|
);
|
|
}
|
|
}
|