Pony.fm/resources/assets/scripts/app/controllers/home.coffee
2015-08-31 16:42:23 +01:00

17 lines
No EOL
415 B
CoffeeScript

window.pfm.preloaders['home'] = [
'dashboard'
(dashboard) -> dashboard.refresh(true)
]
angular.module('ponyfm').controller "home", [
'$scope', 'dashboard'
($scope, dashboard) ->
$scope.recentTracks = null
$scope.popularTracks = null
$scope.news = null
dashboard.refresh().done (res) ->
$scope.recentTracks = res.recent_tracks
$scope.popularTracks = res.popular_tracks
$scope.news = res.news
]