a8m / a8m/angular-filter

Using groupBy filter with ng-repeat in template on iOS9 iPhone4 causes infinite repeating

オープン
#203 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
2.9k
フォーク
319
PR マージ指標
30日以内にマージされた PR はありません

説明

I found that when using the groupBy filter within the template with an ng-repeat that iPhone4 on iOS9 would infinitely repeat the data, causing it to crash the browser if there was a particularly large set of data. This behaviour didn't present on any other devices I was testing (desktop Chrome, FF, IE9+, Android device using Chrome browser) including an iPhone 4 on iOS8.

An example of the template code I was using is as follows (where groupingMonth is an attribute of data):

```


```

I ended up being able to resolve the problem for my current purposes by moving the filters into the controller, eg:

```
$scope.groupedData = $filter('orderBy')($filter('toArray')($filter('groupBy')($scope.data, 'groupingMonth'), true), '$key', true);


```

Either the groupBy filter shouldn't be used in the ng-repeat and perhaps something documented to say as such would help others, or something has fundamentally changed with iOS9 which causes this behaviour regardless of how the filter is written. I investigated as much as I could but wasn't able to pin down why this behaviour presents in iOS9 and not iOS8. I used angular-filter v0.5.5 and tried upgrading to 5.5.8 with the same behaviour seen on both.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。