Pony.fm/resources/assets/scripts/app/directives/track-player.coffee

15 lines
378 B
CoffeeScript
Raw Normal View History

2015-08-31 17:42:21 +02:00
angular.module('ponyfm').directive 'pfmTrackPlayer', () ->
2015-10-25 03:35:37 +01:00
restrict: 'E'
templateUrl: '/templates/directives/track-player.html'
scope:
track: '=track',
class: '@class'
replace: true
2015-08-31 17:42:21 +02:00
2015-10-25 03:35:37 +01:00
controller: [
'$scope', 'player'
($scope, player) ->
$scope.play = () ->
player.playTracks [$scope.track], 0
]