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

16 lines
409 B
CoffeeScript
Raw Normal View History

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