[英]JHipster: After generating an entity, how can I access a custom java function in my EntityResource from the frontend?
[英]How can I custom sort the contentful response on the frontend of my angular app
我在AngularJS應用程序中使用Contentful ...我有一個內容類型team
,其中包含team
簡歷的列表。 http://uat.traverusglobal.com (底部)
我已經使用angular-contentful
成功地從內容中獲取了數據...現在,我需要按名稱或其他內容域對響應進行排序。 以便管理員可以控制訂單。
我該如何在我的角度應用程序的前端對有問題的響應進行排序? 以下是我的嘗試。
https://jsfiddle.net/k3jmq2gm/1/
<div class="columns teams-list" contentful-entries="'content_type=staff'" ng-controller="teamContentful">
<div ng-repeat="item in $contentfulEntries.items | orderBy:'item.fields.name'" class="column" data-flag="{{item.fields.flag}}" data-visible="{{item.fields.visible}}" ng-class='{active:$first}' data-tab="1" data-title="{{item.fields.title}}" data-name="{{item.fields.name}}">
<!-- <h1>{{item[0].title}}</h1> -->
<img src="{{ item.fields.image.fields.file.url }}" title="{{item.img}}">
<p class="hide bio">{{item.fields.bio}}</p>
</div>
</div>
正如Und3rTow指出的那樣。 orderBy
應該是orderBy:'fields.name'
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.