0
I need to create a function to make a ordeBy
customized into a ngRepeat
, but I am not able to think logical that I should use to perform the ordering.
The requirement to sort the list is as follows:
Resources must be displayed in ascending order of the date of presentation. Objections must be displayed below the resource associated in ascending order of the date of submission.
Follow an example array, where the association between Resources and Challenges is given by the Number field:
[{
'numero': '1',
'dataApresentacao': '2016-01-26T00:00:00-02:00',
'tipo': 'RECURSO'
}, {
'numero': '2',
'dataApresentacao': '2016-01-26T00:00:00-02:00',
'tipo': 'RECURSO'
}, {
'numero': '3',
'dataApresentacao': '2016-01-28T00:00:00-02:00',
'tipo': 'RECURSO'
}, {
'numero': '1',<br>
'dataApresentacao': '2016-01-28T00:00:00-02:00',
'tipo': 'IMPUGNACAO'
}, {
'numero': '4',
'dataApresentacao': '2016-01-27T00:00:00-02:00',
'tipo': 'RECURSO'
}, {
'numero': '1',
'dataApresentacao': '2016-01-29T00:00:00-02:00',
'tipo': 'IMPUGNACAO'
}, {
'numero': '2',
'dataApresentacao': '2016-01-29T00:00:00-02:00',
'tipo': 'IMPUGNACAO'
}]
Any idea?
Guillherme, when formatting your question, use the markdown made available by the website.
– user28595
Did you try anything? It’s more productive to help you if we can analyze your code, so you can give more efficient answers and you learn more in the process. Good luck!
– brasofilo