Pony.fm/resources/assets/scripts/app/controllers/home.coffee

16 lines
369 B
CoffeeScript
Raw Normal View History

2015-08-31 17:42:21 +02:00
window.pfm.preloaders['home'] = [
'dashboard'
(dashboard) -> dashboard.refresh(true)
]
angular.module('ponyfm').controller "home", [
'$scope', 'dashboard'
($scope, dashboard) ->
$scope.recentTracks = null
$scope.popularTracks = null
dashboard.refresh().done (res) ->
$scope.recentTracks = res.recent_tracks
$scope.popularTracks = res.popular_tracks
]