Search code examples
angulartypescriptsemantic-ui

Semantic UI - Accordion not expanding in Angular


I am trying to add a semantic-ui accordion into my Angular application, however when i add it onto the page, it is not 'clickable'.

I am aware, that I am supposed to initialize the accordion, but frankly as a begginer to Angular and typescript I am not quite sure where exactly I am supposed to put the init script. I tried putting it into the html file, but that did not do anything.

The init function should be following:

$('.ui.accordion')
  .accordion()

Solution

  • This is a Jquery Function, If you want to use An Accordion with Angular I suggest you use n2-semantic-ui as @penleychan suggested or better ngBootstrap Accordion or material design expansion