mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-23 13:37:59 +01:00
17 lines
No EOL
465 B
CoffeeScript
17 lines
No EOL
465 B
CoffeeScript
window.pfm.preloaders['tracks-list'] = [
|
|
'tracks', '$state'
|
|
(tracks, $state) ->
|
|
tracks.loadFilters().then(->
|
|
tracks.mainQuery.fromFilterString($state.params.filter)
|
|
tracks.mainQuery.setPage $state.params.page || 1
|
|
|
|
tracks.mainQuery.fetch()
|
|
)
|
|
]
|
|
|
|
angular.module('ponyfm').controller "tracks-list", [
|
|
'$scope', 'tracks', '$state',
|
|
($scope, tracks, $state) ->
|
|
tracks.mainQuery.fetch().done (searchResults) ->
|
|
$scope.tracks = searchResults.tracks
|
|
] |