Pony.fm/public/scripts/app/controllers/albums-list.coffee

12 lines
328 B
CoffeeScript
Raw Normal View History

2013-08-01 04:01:41 +02:00
window.pfm.preloaders['albums-list'] = [
'albums', '$state'
(albums, $state) ->
albums.fetchList($state.params.page, true)
]
angular.module('ponyfm').controller "albums-list", [
'$scope', 'albums', '$state'
($scope, albums, $state) ->
albums.fetchList($state.params.page).done (list) ->
$scope.albums = list.albums
]