Pony.fm/public/scripts/app/controllers/artist-favourites.coffee
2013-08-20 21:40:11 -05:00

13 lines
No EOL
453 B
CoffeeScript

window.pfm.preloaders['artist-favourites'] = [
'artists', '$state'
(artists, $state) ->
$.when.all [artists.fetch($state.params.slug), artists.fetchFavourites($state.params.slug, true)]
]
angular.module('ponyfm').controller "artist-favourites", [
'$scope', 'artists', '$state'
($scope, artists, $state) ->
artists.fetchFavourites($state.params.slug).done (artistResponse) ->
$scope.favourites = artistResponse
console.log artistResponse
]