Search Posts

Category: angularjs-orderby

How to orderBy a value returned after function call which is in loop?

I am looping an object in view and calling a function which takes its members as parameters. The function returns me a value every time the function is called. I want to orderBy that returned value. But my problem is, that value is returned after function call and I cannot store the values in an array so that I can sort. <div ng-repeat=”member in current_project.members | orderBy : ‘?'”> <span class=”taskCompletionEst”> Estimated time: {{estimatedTimeSum(selected_date,}} […]

angularjs: orderBy sort not working correctly for multiple field types

I have a table that contains multiple field types (string, dates, addresses). The orderBy seems to be working for Dates and Case Number, which contains both letters and numbers, however it doesn’t seem to be working correctly for addresses and strings. <thead> <tr> <th> <input type=”checkbox” id=”selectAll” ng-model=”selectAll” ng-click=”checkAll()”/> </th> <th> <a href=”javascript:void(0)” ng-click=”sortType = ‘case_num’; sortReverse = !sortReverse”> <span ng-show=”sortType == ‘case_num’ && !sortReverse” class=”fa fa-arrow-down”></span> <span ng-show=”sortType == ‘case_num’ && sortReverse” class=”fa fa-arrow-up”></span> […]

angular table orderBy colunm

I try to angular table order By Date Column(descending order).But It doesn’t work(Date Column data type is String,in some reason have to get String data type).Please help me. Sample Data Trans.Date | Receipt / Ref No | Trx Code | Description | Receipt Amt | Debit | Credit | Running Balance 2013-08-15 | 000000000001 | OST | OST | 0.00 | 150.00 | 0.00 | 150.00 2013-08-15 | 000000000001 | OTH | Amounts | 0.00 […]