My challenge lies in loading events from the database onto my calendar view using angular-calendar. I have created an API that returns resources, but I am struggling to bind them onto CalendarEvents. Here is the part where I am attempting to do so: https://i.sstatic.net/bhaq8.jpg
The browser console is showing me an "undefined" error: https://i.sstatic.net/vdG7Q.jpg
I was able to make it work in some manner, however, it is not adding to an array. Instead, it just replaces the existing one with a new one. I understand why this is happening but I am finding it challenging to fix. Here's what I mean: https://i.sstatic.net/CZggx.jpg
I'm wondering how I could push to it or add at a specific index.