Pony.fm/public/scripts/app/directives/progress-bar.coffee

5 lines
188 B
CoffeeScript
Raw Normal View History

2013-07-25 23:33:04 +02:00
angular.module('ponyfm').directive 'pfmProgressBar', () ->
(scope, element, attrs) ->
scope.$watch attrs.pfmProgressBar, (val) ->
return if !val?
2013-08-01 10:57:08 +02:00
$(element).css 'width', val + '%'