mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Implemented GET call requests to see the events and also each event detail
This commit is contained in:
@@ -4,6 +4,7 @@ import { Event } from '../../models/event.model';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { Router } from '@angular/router';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -28,6 +29,7 @@ timeDate = this.today.getHours() + ":" + this.today.getMinutes();
|
||||
segment:string;
|
||||
|
||||
events: Event[];
|
||||
eventsList: Observable<Event[]>;
|
||||
|
||||
constructor(private eventService: EventsService, private router: Router, public activatedRoute: ActivatedRoute) { }
|
||||
|
||||
@@ -37,6 +39,7 @@ timeDate = this.today.getHours() + ":" + this.today.getMinutes();
|
||||
this.showGreeting();
|
||||
/* Call Get events method */
|
||||
this.events = this.eventService.getAllEvents();
|
||||
this.eventsList = this.eventService.allEvents();/* .subscribe(prods=>console.log(prods)); */
|
||||
}
|
||||
|
||||
showGreeting(){
|
||||
|
||||
Reference in New Issue
Block a user