Skip to content

Wrong key resolving for ngModel in decorator.js #761

@senyaak

Description

@senyaak

In https://github.com/json-schema-form/angular-schema-form/blob/development/src/services/decorators.js#L193-L201 the ngModel won't get correct path if the directive will be called in ngRepeat, cause some key(s) well be an empty string.
Example we have ['lvl1','array','', 'value']
After resolving we'll get 'model['lvl1']['array']['']['value']' and this isn't right.
At this point if the key array contains an empty string, we should use a scope.$index for this key!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions