The problem lies with the scope you are linking. The @
symbol links data as a string instead of as an object.
Instead try =
, like such:
app.directive 'progressIndicator', ->
restrict : 'E'
scope : { progress : '=' }
link : (scope,element,attrs) ->
scope.$watch 'progress' , (v) ->
scope.curPrg = v
template : '<label>In progress: {{curPrg.text}}' +
'<progress></progress>'