Pony.fm/resources/assets/scripts/app/directives/track-player.coffee
2015-08-31 16:42:23 +01:00

14 lines
No EOL
314 B
CoffeeScript

angular.module('ponyfm').directive 'pfmTrackPlayer', () ->
restrict: 'E'
templateUrl: '/templates/directives/track-player.html'
scope:
track: '=track',
class: '@class'
replace: true
controller: [
'$scope', 'player'
($scope, player) ->
$scope.play = () ->
player.playTracks [$scope.track], 0
]