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-09-02 02:11:33 +02:00
|
|
|
$scope.news = null
|
2013-07-28 23:51:35 +02:00
|
|
|
|
2013-07-31 13:47:16 +02:00
|
|
|
dashboard.refresh().done (res) ->
|
|
|
|
$scope.recentTracks = res.recent_tracks
|
|
|
|
$scope.popularTracks = res.popular_tracks
|
2013-09-02 02:11:33 +02:00
|
|
|
$scope.news = res.news
|
2013-07-28 23:51:35 +02:00
|
|
|
]
|