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

15 lines
378 B
CoffeeScript
Raw Normal View History

2013-07-31 13:47:16 +02:00
window.pfm.preloaders['dashboard'] = [
'dashboard'
(dashboard) -> dashboard.refresh(true)
]
2013-07-28 23:51:35 +02:00
angular.module('ponyfm').controller "dashboard", [
2013-07-31 13:47:16 +02:00
'$scope', 'dashboard'
($scope, dashboard) ->
2013-07-28 23:51:35 +02:00
$scope.recentTracks = null
$scope.popularTracks = null
2013-07-31 13:47:16 +02:00
dashboard.refresh().done (res) ->
$scope.recentTracks = res.recent_tracks
$scope.popularTracks = res.popular_tracks
2013-07-28 23:51:35 +02:00
]