Pony.fm/resources/assets/scripts/app/controllers/albums-list.coffee

13 lines
362 B
CoffeeScript
Raw Normal View History

2015-08-31 17:42:21 +02:00
window.pfm.preloaders['albums-list'] = [
2015-10-25 03:35:37 +01:00
'albums', '$state'
(albums, $state) ->
albums.fetchList($state.params.page, true)
2015-08-31 17:42:21 +02:00
]
angular.module('ponyfm').controller "albums-list", [
2015-10-25 03:35:37 +01:00
'$scope', 'albums', '$state'
($scope, albums, $state) ->
albums.fetchList($state.params.page).done (list) ->
$scope.albums = list.albums
]