Open tareqkabani opened 5 years ago
I am trying to find a solution for how to connect with api to fetch events from database
Oh ok so you are looking for this documentation from FullCalendar. In a nutshell you can pass in an Array or a JSON feed to the events
property or you can access the calendar
(and its API) on the component and call the addEvent method
@Component({
...
})
export class MyComponent {
@ViewChild(NgxFullCalendarComponent) fc: FullCalendarComponent;
ngOnInit() {
fc.calendar.addEvent({...});
}
}
The JSON feed should work since the props are simply passed down to the FullCalendar control but I have noticed that it is currently typed to Array<EventObject>
so this will need fixing
As you know I started over and over again to solve this problem So I came back to ask you how the data is being called directly from the database by the API I used this : https://raw.githubusercontent.com/tareqkabani/demo/master/vents.json
I would check over this link in the documentation, this component simply wraps the FullCalendar component and exposes its API, if you provide the json feed through events
this will get passed through to the FullCalendar.
Could you provide more details of what you need to achieve to help with answering this?