Pony.fm/resources/assets/scripts/app/directives/progress-bar.coffee

5 lines
188 B
CoffeeScript
Raw Normal View History

2015-08-31 17:42:21 +02:00
angular.module('ponyfm').directive 'pfmProgressBar', () ->
(scope, element, attrs) ->
scope.$watch attrs.pfmProgressBar, (val) ->
return if !val?
$(element).css 'width', val + '%'