This repository has been archived on 2026-05-07. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Codiki/frontend/src/app/pages/home/home.component.ts
T
florianandTamotsu 1ca2f872f7
Build and Deploy Java Gradle Application / build-and-deploy (push) Successful in 1m39s
Update dependencies - spring boot 4 and angular 21 (#10)
Co-authored-by: Florian THIERRY
Reviewed-on: florian/codiki-hexagonal#10
2025-12-30 17:45:03 +01:00

35 lines
1.1 KiB
TypeScript

import { Component, OnInit, inject } from '@angular/core';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
import { Observable } from 'rxjs';
import { PublicationListComponent } from '../../components/publication-list/publication-list.component';
import { Publication } from '../../core/rest-services/publications/model/publication';
import { HomeService } from './home.service';
import { CommonModule } from '@angular/common';
@Component({
selector: 'app-home',
imports: [
CommonModule,
MatProgressSpinnerModule,
PublicationListComponent
],
templateUrl: './home.component.html',
styleUrl: './home.component.scss',
providers: [HomeService]
})
export class HomeComponent implements OnInit {
private homeService = inject(HomeService);
get isLoading$(): Observable<boolean> {
return this.homeService.isLoading$;
}
get publications$(): Observable<Publication[]> {
return this.homeService.publications$;
}
ngOnInit(): void {
this.homeService.startLatestPublicationsRetrieving();
}
}