angular-mgl-timeline
angular-mgl-timeline copied to clipboard
Issue with Alternate
I am having trouble with the alternate option.
<mgl-timeline [toggle]="toggle" [alternate]="alternate">
<div *ngFor="let year of workExData;">
<app-work-ex-year
[displayYear]=Object.keys(year)[0]>
</app-work-ex-year>
<app-work-ex-position *ngFor="let job of year[Object.keys(year)[0]].jobs" [job]=job>
</app-work-ex-position>
</div>
</mgl-timeline>
Both app-work-ex-year
and app-work-ex-position
are components that have a template for the mgl-timeline-entry
component. I have set both toggle and alternate to be true but they do not work. I also read in the documentation that the default behaviour for toggle and alternate is also true but I'm not sure why its working. Could it be related to the mgl-timeline-entry
being wrapped by a div
? Any suggestions?
Yes, this could be the problem. mgl-timeline-entry
elements need to be direct children of the mgl-timeline
elements for everything to work smoothly.
Please let me know if this helps.