Angularjs groupBy + orderBy

后端 未结 5 1748
暗喜
暗喜 2020-12-07 01:01

I am using groupBy from angular-filter to group an array of objects by their date property.

5条回答
  •  庸人自扰
    2020-12-07 01:56

    Recently had the same issue. groupBy creates an object, but the orderBy needs an array, so there's a little bit of funkiness involved. I ended up getting the answer straight from their issues page where one of the authors does an excellent job of explaining it complete with code samples that was basically copy/paste for me.

    https://github.com/a8m/angular-filter/issues/57#issuecomment-65041792

提交回复
热议问题