angularJS 常见错误之ngModel:nonassign

错误内容如下:

angular.js:14199 Error: [ngModel:nonassign] Expression '' is non-assignable. Element:
http://errors.angularjs.org/1.5.11/ngModel/nonassign?p0=&p1=%3Cinputlass%3D%22ng-pristine%20ng-untouched%20ng-valid%22%20ng-model%3D%22%22%3E
    at http://localhost:3000/bower_components/angular/angular.js:68:12
    at NgModelController.$$setOptions (http://localhost:3000/bower_components/angular/angular.js:27915:13)
    at Object.ngModelPreLink (http://localhost:3000/bower_components/angular/angular.js:28742:21)
    at http://localhost:3000/bower_components/angular/angular.js:1259:18
    at invokeLinkFn (http://localhost:3000/bower_components/angular/angular.js:10152:9)
    at nodeLinkFn (http://localhost:3000/bower_components/angular/angular.js:9528:11)
    at compositeLinkFn (http://localhost:3000/bower_components/angular/angular.js:8810:13)
    at compositeLinkFn (http://localhost:3000/bower_components/angular/angular.js:8813:13)
    at compositeLinkFn (http://localhost:3000/bower_components/angular/angular.js:8813:13)
    at compositeLinkFn (http://localhost:3000/bower_components/angular/angular.js:8813:13)


截图如下:

angularJS 常见错误之ngModel:nonassign_第1张图片


可以根据提示看出是元素中一个表达没有意义。

原因是ng-model=""这里不可以为空

你可能感兴趣的:(AngularJS,日常问题)