簡體   English   中英

AngularJS ng-repeat和filter

[英]AngularJS ng-repeat and filter

ng-repeat填充完我的內容時,我正在使用scope.$firstscope.$index將手風琴應用於我的內容。 起初,我只使用scope.$last但是遇到了這個問題-嘗試搜索一些信息(使用過濾器)然后返回整個列表時,手風琴不適用。

ng-repeat完成后如何應用手風琴並在過濾時進一步保存它?

我建議將“應用手風琴”功能包裝到指令中。 為ng-repeat東西定義一個模板,然后$ watch()更改模型數據。 當$ watch觸發時,應用手風琴的東西。

另請參閱https://groups.google.com/d/topic/angular/lACrEA-TIto/discussion
http://angular-ui.github.com/bootstrap/

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM