TypeError: Cannot read property 'updateOn' of undefined
On the example page, if I switch from the "simple" example to the "complex key support" example, I get the error message:

Yes, I actually noticed this a while ago – thanks for filing the bug. The release version of Angular 1.3 broke support for keys that contain brackets, so while SF correctly writes a'rr[\"l as <input ... ng-model="model['a\'rr[\\"l']">, Angular is failing to parse it. I'll file a bug with Angular and reference this one. This is probably a super crazy edge case, but unless Angular dropped this for performance reasons (which I could definitely understand) this is a bug.
Thanks. When you do so could you reference that issue here?
FWIW, I encounter this error in my own application as well, but it goes away if I navigate away and navigate back to the page in question. Whereas, when I fiddle with the test on the example page, the error seems to stay regardless of whether I navigate away and return.
I am getting this issue while using it within a popover. I have no issues with using any other directives inside the popover. Any thoughts of how to solve this at least temporarily?
I am getting this error in my custom decorator:
<div class="schema-form-layout-grid {{form.htmlClass}}">
<div class="container">
<div class="row" ng-repeat="row in form.rows">
<div class="{{col.colTypeClass}}" ng-repeat="col in row.cols">
<sf-decorator form="col.content"></sf-decorator>
</div>
</div>
</div>
</div>
Never mind my issue, I realized the error is gone if i use "item in form.items" instead of "row in form.rows" or "col in form.cols".
This is a weird one. Angular has problems with ngModelOptions, I haven't dug deeply, but leaving the options object undefined seems to trigger this. I have some code in schema form that just populates it with an empty {} just for that sake. So I guess its probably a timing issue, the first digest loop the model options aren't properly defined but the next they are, but that is just a guess.
I got the same error "Cannot read property 'updateOn' of undefined" on my custom decorator. And break the executation. Help me to resolve this.
<div sf-repeaterSimple="form" class="schema-form-repeaterSimple {{form.htmlClass}}"
ng-model="$$value$$" ng-model-options="form.ngModelOptions" sfRepeaterSimple>
<h3 ng-show="form.title && form.notitle !== true">{{ form.title }}</h3>
<ol class="list-group" ng-model="modelRepeaterSimple" ui-sortable>
<li class="list-group-item {{form.fieldHtmlClass}}"
ng-repeat="item in modelRepeaterSimple track by $index">
<button ng-hide="form.readonly"
ng-click="deleteFromRepeaterSimple($index)"
style="position: relative; z-index: 20;"
type="button" class="close pull-right">
<span aria-hidden="true">×</span><span class="sr-only">Close</span>
</button>
<sf-decorator ng-init="repeaterSimpleIndex = $index" form="copyWithIndex($index)"></sf-decorator>
</li>
</ol>
<div class="clearfix" style="padding: 15px;">
<button ng-hide="form.readonly || form.add === null"
ng-click="appendToRepeaterSimple()"
type="button"
class="btn {{ form.style.add || 'btn-default' }} pull-right">
<i class="glyphicon glyphicon-plus"></i>
{{ form.add || 'Add'}}
</button>
</div>
<div class="help-block"
ng-show="(hasError() && errorMessage(schemaError())) || form.description"
ng-bind-html="(hasError() && errorMessage(schemaError())) || form.description"></div>
</div>
Is there a workaround for this?
@airdrik over in issue #255 seems to have a solution, I haven't been able to confirm it since I'm having trouble reproducing it, but the fix is in the development branch now.
The solution was actually provided by @plong0.
I'd also run into this problem, and had worked around it by adding ngModelOptions: {} fields to any form elements in the items list of another form element, e.g. form elements within fieldset, section, tabs, tabarray, etc.
I'll give plong0's solution a try though as it would be nice to clean up some of those items that were only expanded into full objects because they needed that ngModelOptions field set to something.
Oh sorry, I messed up the name, as @airdrik says the solution came from @plong0.
And yes a more correct solution would be to only add the ngModelOptions attribute to the input if the form has it, but I don't know how to do that in a clean and performant way (i.e. no double $compile)
Another fix is to patch angular so that an undefined ngModelOption doesn't trigger an exception.
Sorry to bring this up again, but I was doing exactly what @asadighi was trying to do and get this error.
The template can iterate down to cell.items and it can display the strings inside, but once I change the text binding from {{cell.items}} to <sf-decorator ng-repeat="cellitem in cell.items" form="cellitem"></sf-decorator> it throws.
How did you workaround that?