Pony.fm/public/scripts/app/directives/track-player.coffee

14 lines
314 B
CoffeeScript
Raw Normal View History

2013-08-16 01:49:20 +02:00
angular.module('ponyfm').directive 'pfmTrackPlayer', () ->
restrict: 'E'
templateUrl: '/templates/directives/track-player.html'
scope:
track: '=track',
class: '@class'
2013-08-23 02:48:40 +02:00
replace: true
2013-08-16 01:49:20 +02:00
controller: [
'$scope', 'player'
($scope, player) ->
$scope.play = () ->
player.playTracks [$scope.track], 0
]