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

11 lines
301 B
CoffeeScript
Raw Normal View History

2013-07-28 19:45:21 +02:00
angular.module('ponyfm').controller 'playlist', [
'$scope', '$state'
($scope, $state) ->
console.log $state.params.id
2013-07-28 19:45:21 +02:00
$scope.refresh = () ->
$.getJSON('/api/web/playlists/show/' + $state.params.id)
.done (playlist) -> $scope.$apply ->
$scope.playlist = playlist
$scope.refresh()
]