1

I'm using scope.$first and scope.$index to apply accordion to my content when ng-repeat finishes populating it. At first I was using just scope.$last but faced this problem - when try to search for some info (using filter) and then turn back to the whole list, accordion doesn't apply.

How to apply accordion when ng-repeat finishes and save it further while filtering?

4

1 回答 1

1

我建议将“应用手风琴”功能包装到指令中。为 ng-repeat 定义一个模板,然后 $watch() 模型数据进行更改。当 $watch 触发时,应用手风琴的东西。

另请参阅https://groups.google.com/d/topic/angular/lACrEA-TIto/discussion
http://angular-ui.github.com/bootstrap/

于 2013-01-11T17:43:16.790 回答