Pony.fm/public/scripts/app/controllers/track.coffee
2013-07-31 18:04:04 -05:00

12 lines
No EOL
313 B
CoffeeScript

window.pfm.preloaders['track'] = [
'tracks', '$state'
(tracks, $state) ->
tracks.fetch $state.params.id
]
angular.module('ponyfm').controller "track", [
'$scope', 'tracks', '$state'
($scope, tracks, $state) ->
tracks.fetch($state.params.id).done (trackResponse) ->
$scope.track = trackResponse.track
]