0

I tried using the accordion from https://angular-ui.github.io/bootstrap/#!#accordion and after hours of trying and not getting the desired results, I changed the bootstrap version from 4.0.0 to 3.0.0 and everything showed up perfectly. With v4, I get this:

enter image description here

Only some clickable text, like a href tag. By clicking on it, sometimes it shows the content, sometimes not. I used this:

<uib-accordion close-others="oneAtATime">
<div uib-accordion-group class="mt-1" heading="Online friends" is-open="true">
</div>
<div uib-accordion-group class="mt-1" heading="Offline friends" is-open="false">
</div>
</uib-accordion>

Additional info:

  • angular version: 1.6.4
  • ui-bootstrap-tpls 2.5.0
  • jquery 3.2.1
  • bootstrap 4.0.0

What could be the problem?

1 Answer 1

2

What could be the problem?

Bootstrap 4 is almost a complete rewrite of Bootstrap 3.

So, the two versions are completely incompatible with each other.

You cannot use Bootstrap 3 code with Bootstrap 4 css and vice versa.

Reference:

https://getbootstrap.com/docs/4.0/migration/

Bootstrap 4 accordion docs:

https://getbootstrap.com/docs/4.0/components/collapse/#accordion-example

Sign up to request clarification or add additional context in comments.

2 Comments

I know they are not backwards compatible, but the question remains: if I use v4 and want the accordion, what do I do?
I knew about collapse, but I thought there might be something from another library, as uib-accordion is. Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.