Commit 0fe5cf1d54d48b382b932a481d504ec8d35c0cad
1 parent
a5651cab
Exists in
master
and in
6 other branches
Fix #50
Showing
1 changed file
with
3 additions
and
1 deletions
Show diff stats
src/app/pages/inicio/inicio.controller.js
... | ... | @@ -85,7 +85,9 @@ |
85 | 85 | vm.DialogaService.getEvents().then(function(data) { |
86 | 86 | vm.$log.debug('getEvents.success', data); |
87 | 87 | vm.events = data.articles; |
88 | - vm.featuredEvent = vm.events[0]; | |
88 | + | |
89 | + var orderBy = vm.$filter('orderBy'); | |
90 | + vm.featuredEvent = orderBy(vm.events, 'start_date', false)[0]; | |
89 | 91 | }, function(error) { |
90 | 92 | vm.$log.debug('Error on getEvents.', error); |
91 | 93 | vm.eventsError = error; | ... | ... |