Set up model options.

This commit is contained in:
Paulo Reis 2016-06-24 11:02:29 +01:00
parent e51bdaaaaf
commit a587d5ddba
2 changed files with 10 additions and 2 deletions

View file

@ -11,9 +11,14 @@ script(type='text/ng-template', id='supportModalTemplate')
label
| #{translate("subject")}
.form-group
input.field.text.medium.span8.form-control(ng-model="form.subject", maxlength='255', tabindex='1', onkeyup='')
input.field.text.medium.span8.form-control(
ng-model="form.subject",
ng-model-options="{ updateOn: 'default blur', debounce: {'default': 350, 'blur': 0} }"
maxlength='255',
tabindex='1',
onkeyup='')
.contact-suggestions
p.contact-suggestion-label Have you checked our knowledge base?
p.contact-suggestion-label Have you checked our knowledge base? {{ form.subject }}
ul.contact-suggestion-list
li: a.contact-suggestion-list-item
span Item 1 - subsection lorem

View file

@ -36,6 +36,9 @@ define [
$scope.sent = true
$scope.$apply()
$scope.$watch 'form.subject', (newVal, oldVal) ->
console.log newVal, oldVal
$scope.close = () ->
$modalInstance.close()