Commit 925bff40 authored by Kristof Csillag's avatar Kristof Csillag Committed by csillag

Fix word list directive update problem

parent 53a7b213
......@@ -313,11 +313,16 @@ wordlist = ['$filter', '$timeout', ($filter, $timeout) ->
input.bind 'blur change keyup', ->
# TODO: filter for invalid chars, deduplicate
new_words = input[0].value.trim().toLowerCase().split " "
if new_words[0] is "" then new_words = []
# console.log "Got new words: "
# console.log new_words
ctrl.$setViewValue new_words
scope.$digest()
# Re-render when it becomes uneditable.
scope.$watch 'readonly', (readonly) ->
ctrl.$render()
require: '?ngModel'
restrict: 'E'
scope:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment