DEV Community

Cover image for Angular accordion working demo
AjayMalhotra
AjayMalhotra

Posted on

Angular accordion working demo

Here is the link from where you can check angular 8 accordion working example:

Angular 8 accordion working demo

Thank you

Top comments (2)

Collapse
 
seanperkins profile image
Sean Perkins

Using jQuery isn't the move with Angular. You could improve this accordion by using Angular components to break up the different functional aspects of an accordion.

Also, if you are needing to look up elements (which a componentized accordion wouldn't need), the use of ViewChild is highly recommended.

The title is a little misleading, as you aren't using anything Angular with regards to the accordion, just inserting non-Angular specific code into an app component. Would love to see you adapt this to use Angular's recommended practices to avoid misleading individuals against best practices.

Would be happy to help point you in the right direction if you're curious!

Collapse
 
ajaydeveloper profile image
AjayMalhotra

Yes you are right and thank you.