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,7 +85,9 @@ | ||
85 | vm.DialogaService.getEvents().then(function(data) { | 85 | vm.DialogaService.getEvents().then(function(data) { |
86 | vm.$log.debug('getEvents.success', data); | 86 | vm.$log.debug('getEvents.success', data); |
87 | vm.events = data.articles; | 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 | }, function(error) { | 91 | }, function(error) { |
90 | vm.$log.debug('Error on getEvents.', error); | 92 | vm.$log.debug('Error on getEvents.', error); |
91 | vm.eventsError = error; | 93 | vm.eventsError = error; |