The problem is the following: As soon as I use the accordion in a view that is loaded in the ng-view directive, the accordion title clicks dont work correctly anymore
http://plnkr.co/edit/KGwuqDIb7I5NrYCtPOPk?p=preview
If the accordion is use in the page itself with no ng-view, the accordion works perfectly
http://plnkr.co/edit/8dY7JU1kxjZ2jAKmMIrP?p=preview
Any clue to what Im missing?
I was having an issue using href and data-target together, so if you are using this in an application I'd recommend specifying one or the other but not both.
When I used both, I'd get redirected to my login page as soon as I clicked on it. With one or the other specified it worked fine, but not with both.
You can empty the
href=""
and usedata-target="#collapse"
instead, this worked for mei.e
The problem is that Bootstrap appends
#according_name
within aa
tag. This triggers a AngularJS routing and due to route changetest.html
is loaded again on every click on accordian link.Your options are to try to configure
$locationProvider
to use HTML5 mode with hashbag if it worksSee some documentation here
Other would be to use angular-ui component but it has been not ported to support version 3 of bootstrap.
Actually, there might be a simpler solution.
You can just make sure that the links don't propagate the URL change.
Add to the
a
tagonclick="return false;"