Pony.fm/public/scripts/app/controllers/artist.coffee

12 lines
329 B
CoffeeScript
Raw Normal View History

2013-08-01 04:01:41 +02:00
window.pfm.preloaders['artist'] = [
'artists', '$state'
(artists, $state) ->
artists.fetch $state.params.slug
]
angular.module('ponyfm').controller "artist", [
'$scope', 'artists', '$state'
($scope, artists, $state) ->
artists.fetch($state.params.slug).done (artistResponse) ->
$scope.artist = artistResponse.artist
]