Pony.fm/public/scripts/app/controllers/home.coffee

17 lines
415 B
CoffeeScript
Raw Normal View History

window.pfm.preloaders['home'] = [
'dashboard'
(dashboard) -> dashboard.refresh(true)
]
angular.module('ponyfm').controller "home", [
'$scope', 'dashboard'
($scope, dashboard) ->
$scope.recentTracks = null
$scope.popularTracks = null
2013-09-02 04:11:29 +02:00
$scope.news = null
dashboard.refresh().done (res) ->
$scope.recentTracks = res.recent_tracks
$scope.popularTracks = res.popular_tracks
2013-09-02 04:11:29 +02:00
$scope.news = res.news
]