Skip to content

Error when there is a dash in field name #168

Closed
@mohsen1

Description

@mohsen1

If my model has property with dash in it, I will get the following errors.

Error: [ngModel:nonassign] Expression 'model.X-Test' is non-assignable. Element: <input ng-show="form.key" type="{{form.type}}" step="any" sf-changed="form" placeholder="{{form.placeholder}}" class="form-control" ng-model-options="form.ngModelOptions" ng-model="model.X-Test" ng-disabled="form.readonly" schema-validate="form">
http://errors.angularjs.org/1.2.15/ngModel/nonassign?p0=model.X-Test&p1=%3C…t%22%20ng-disabled%3D%22form.readonly%22%20schema-validate%3D%22form%22%3E
    at http://0.0.0.0:9000/bower_components/angular/angular.js:78:12
    at new NgModelController (http://0.0.0.0:9000/bower_components/angular/angular.js:16922:28)
    at invoke (http://0.0.0.0:9000/bower_components/angular/angular.js:3805:17)
    at Object.instantiate (http://0.0.0.0:9000/bower_components/angular/angular.js:3816:23)
    at $get (http://0.0.0.0:9000/bower_components/angular/angular.js:6922:28)
    at http://0.0.0.0:9000/bower_components/angular/angular.js:6309:34
    at forEach (http://0.0.0.0:9000/bower_components/angular/angular.js:330:20)
    at nodeLinkFn (http://0.0.0.0:9000/bower_components/angular/angular.js:6296:11)
    at compositeLinkFn (http://0.0.0.0:9000/bower_components/angular/angular.js:5761:15)
    at nodeLinkFn (http://0.0.0.0:9000/bower_components/angular/angular.js:6344:24) 

From what I see, it's trying to access model.X-Test which is invalid JS. From my little research it could be related to $$value expression here

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions