Sostituito frontend angular new con frontend angular. Sostituito frontend angular con frontend angular old
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import { Component, ChangeDetectionStrategy, inject, signal, OnInit } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { DataService } from '../../core/services/data.service';
|
||||
import { BetsByTimeComponent } from './bets-by-time/bets-by-time.component';
|
||||
import { BetsByGroupComponent } from './bets-by-group/bets-by-group.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-home',
|
||||
standalone: true,
|
||||
imports: [CommonModule, BetsByTimeComponent, BetsByGroupComponent],
|
||||
templateUrl: './home.component.html',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class HomeComponent implements OnInit {
|
||||
private dataService = inject(DataService);
|
||||
|
||||
viewMode = signal<'time' | 'group'>('time');
|
||||
readonly allBets = this.dataService.getActiveBets;
|
||||
|
||||
ngOnInit() {
|
||||
this.dataService.loadUserBets();
|
||||
}
|
||||
|
||||
setViewMode(mode: 'time' | 'group') {
|
||||
this.viewMode.set(mode);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user