question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problems using accordion inside accordion with Angular 4

See original GitHub issue

I need to use an accordion with other accordions inside. When i was using Angular 2, i worked perfect but when i update to angular 4 using angular-cli 1.0, It stops working.

Here is the code:


<ngb-accordion>
    <ngb-panel title="First panel">
        <template ngbPanelContent>
            <ngb-accordion>
                <ngb-panel id="1" title="First panel">
                    <template ngbPanelContent>
                        Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird
                        on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table,
                        raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
                    </template>
                </ngb-panel>
            </ngb-accordion>
        </template>
    </ngb-panel>
</ngb-accordion>

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

4reactions
mohammedzamakhancommented, Apr 4, 2017

Try to use ng-template instead of template.

3reactions
pkozlowski-opensourcecommented, May 5, 2017

OK, so yesterday I’ve spent some time with Tobias from the Angular team debugging this issue. It turns out that the root cause is a bug in Angular’s handling of queries. I’ve opened an issue to track resolution of Angular’s bug here: https://github.com/angular/angular/issues/16568

Ultimately the solution for this problem will come from https://github.com/angular/angular/issues/16568 but till it is fixed on the Angular side you can use a work-around from http://stackoverflow.com/a/43720470/2435473 (thnx @pankajparkar)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular UI accordion within an accordion - Stack Overflow
With my current implementation, when I select the inner list item both accordions are triggered, leaving the inner one closed. Aren't they in...
Read more >
How to use the Ionic 6 Accordion Component - YouTube
Let's dive into the new Ionic 6 Accordion component and explore what's possible and how to style the accordion with CSS parts!
Read more >
Accordion · Bootstrap v5.0
Build vertically collapsing accordions in combination with our Collapse JavaScript plugin. On this page. How it works; Example. Flush; Always open.
Read more >
Angular PrimeNG Accordion Default - GeeksforGeeks
In this article, we will see how to use the Accordion Default in Angular PrimeNG, along with understanding the properties, & their syntaxes ......
Read more >
MDB accordion fails to toggle when more than one accordion o
@DigiPlan This problem was fixed in v7.4.1, if you are using a newer version and the component still doesn't work correctly, please add...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found