angular-mgl-timeline icon indicating copy to clipboard operation
angular-mgl-timeline copied to clipboard

Issue with Alternate

Open c2khanna opened this issue 6 years ago • 1 comments

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?

c2khanna avatar Oct 30 '18 06:10 c2khanna

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.

glutengo avatar Dec 21 '18 16:12 glutengo