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

12 lines
362 B
CoffeeScript

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
]