glutengo / angular-mgl-timeline

Timeline component for Angular
MIT License
67 stars 33 forks source link

duplicated entry for 'Add Entry'. Help Needed! #37

Closed deborahtrez closed 5 years ago

deborahtrez commented 5 years ago

Okay when you click the button 'Add Entry', it adds an exact duplicate of the first entry.. im trying to create a timeline for different years whereby the headers contain the years e.g, 2018, 2019, 2020....etc and the content section will have different content for each entry. but the Add Entry function pushes (adds to the array) an exact duplicate of the first entry due to "entries" defined in the ts file as as shown below..... (please see the attached photos)

is there a way of maybe defining different entries to hold different header and content material as opposed to the duplication. i want every object in the array "entries" to have different content. entries duplicated

glutengo commented 5 years ago

Of course this is possible - you just need to insert different content into the entries array. Right now your addEntries function always adds the same content. This is not really related to the library.