glutengo / angular-mgl-timeline

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

Dynamic trigger an expand of an entry #27

Open dssoft32 opened 5 years ago

dssoft32 commented 5 years ago

How can i expand an entry from controller by its index ?

glutengo commented 5 years ago

This can be achieved as shown here:

https://stackblitz.com/edit/angular-mgl-timeline-tkdc1x

It is a bit hacky (esp. the path.localName part) and I could come up with a proper API for this. But you can use it as shown in the stackblitz example today.

dssoft32 commented 5 years ago

thanks for your reply. but is there any way to get element reference without viewChild. as i am creating its web component. it gives error ?

Guttz commented 5 years ago

Hello @dssoft32, I couldn't understand why you're not able to use viewChild. Could you clarify a bit more or give us some code example?