Pony.fm/resources/assets/scripts/app/controllers/dashboard.coffee
2015-10-24 19:35:37 -07:00

15 lines
457 B
CoffeeScript

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
]