Here's a couple of things you can try:

1. Notice the accordionGroup directive uses the collapse directive in its 
template 
(https://github.com/angular-ui/bootstrap/blob/master/template/accordion/accordion-group.html
 
)

You can modify and instead of having collapse="!isOpen" you can replace the 
isOpen with a new variable that you would set to false until your condition 
is met

2. Notice the ng-click="toggleOpen()" in the accordion group template 
(https://github.com/angular-ui/bootstrap/blob/master/template/accordion/accordion-group.html
 
). Try creating a custom function e.g. ng-click="openIfConditionMet()" and 
put your logic inside the function




On Thursday, January 23, 2014 4:21:28 AM UTC-5, Adrian Ferreres wrote:
>
> Hello:
>
> I am trying to understand how works the ui.bootstrap accordion in 
> angularjs. In my case of use, I have three accordions of which only the 
> first is allowed to open. The rest of them should not open when the user 
> click on their header until an option is selected from the previous 
> accordion.
>
> Now, I am experimenting with a controller which shows a error message when 
> the user click on the second and third accordeon and, after that, it close 
> them. This is my Plunker with my code:
>
> http://plnkr.co/edit/rSg6Az?p=preview
>
> The part of the error message works fine but I can not get that the 
> accordeon selected is closed when I click it.
>
> Any idea?
>
> Regards:
>
> Adrian Ferreres
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to