mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-27 07:17:59 +01:00
14 lines
No EOL
343 B
CoffeeScript
14 lines
No EOL
343 B
CoffeeScript
angular.module('ponyfm').controller "dashboard", [
|
|
'$scope'
|
|
($scope) ->
|
|
$scope.recentTracks = null
|
|
$scope.popularTracks = null
|
|
|
|
$scope.refresh = () ->
|
|
$.getJSON('/api/web/dashboard')
|
|
.done (res) -> $scope.$apply ->
|
|
$scope.recentTracks = res.recent_tracks
|
|
$scope.popularTracks = res.popular_tracks
|
|
|
|
$scope.refresh()
|
|
] |