Pony.fm/resources/assets/scripts/app/controllers/artist-favourites.coffee

13 lines
457 B
CoffeeScript
Raw Normal View History

2015-08-31 17:42:21 +02:00
window.pfm.preloaders['artist-favourites'] = [
2015-10-25 03:35:37 +01:00
'artists', '$state'
(artists, $state) ->
$.when.all [artists.fetch($state.params.slug), artists.fetchFavourites($state.params.slug, true)]
2015-08-31 17:42:21 +02:00
]
angular.module('ponyfm').controller "artist-favourites", [
2015-10-25 03:35:37 +01:00
'$scope', 'artists', '$state'
($scope, artists, $state) ->
artists.fetchFavourites($state.params.slug).done (artistResponse) ->
$scope.favourites = artistResponse
]