angular-accordion icon indicating copy to clipboard operation
angular-accordion copied to clipboard

Unable to use initally-open while getting title from the ng-repeat

Open dstvishnu opened this issue 8 years ago • 4 comments

when i tried to use the initially-open="true" while using ng-repeat to get the data for the itemTitle.It opens all the elements instead of the only one element

dstvishnu avatar Jan 18 '17 07:01 dstvishnu

It will obviously open all collapsibles because you are setting the initially-open="true" option as true. You can set initially-open value to be a variable or expression so it is only true for the item you want to be open initially.

uxxman avatar Jan 20 '17 10:01 uxxman

Why it is opening all the elements after setting one-at-a-time="true"?

dstvishnu avatar Jan 20 '17 12:01 dstvishnu

one-at-a-time="true" ensures that when a user opens a new collapsible, the other opened collapsible is closed automatically. It doesn't interfere with initially-open="true" value cause that depends on developer.

uxxman avatar Jan 27 '17 14:01 uxxman

"You can set initially-open value to be a variable or expression so it is only true for the item you want to be open initially."

I cant seem to get this to work - could you give an example? I just want to open only the first item output from an ng-repeat

jolleychris avatar May 11 '17 15:05 jolleychris