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

12 lines
411 B
CoffeeScript

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
]