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

12 lines
377 B
CoffeeScript
Raw Normal View History

2013-08-27 08:53:37 +02:00
window.pfm.preloaders['playlists-list'] = [
'playlists', '$state'
(playlists, $state) ->
playlists.fetchList($state.params.page, true)
]
angular.module('ponyfm').controller "playlists-list", [
'$scope', 'playlists', '$state',
($scope, playlists, $state) ->
playlists.fetchList($state.params.page).done (searchResults) ->
$scope.playlists = searchResults.playlists
]