angular.js/docs/content/error/ngModel/nonassign.ngdoc
Ken Sheedlo e4b6a1eaa4 docs(minerr): fill in error message descriptions
Errors I've documented so far:
- `$injector:cdep`
- `$injector:itkn`
- `$injector:modulerr`
- `$injector:nomod`
- `$injector:pget`
- `$injector:unpr`
- `ng:areq`
- `ng:cpi`
- `ng:cpws`
- `ngModel:noass`

Closes #3430
2013-08-07 21:36:59 -07:00

27 lines
715 B
Text

@ngdoc error
@name ngModel:nonassign
@fullName Non-Assignable Expression
@description
This error occurs when expression the {@link api/ng.directive:ngModel ngModel} directive is bound to is a non-assignable expression.
Examples using assignable expressions include:
```
<input ng-model="namedVariable">
<input ng-model="myObj.someProperty">
<input ng-model="indexedArray[0]">
```
Examples of non-assignable expressions include:
```
<input ng-model="foo + bar">
<input ng-model="42">
<input ng-model="'oops'">
<input ng-model="myFunc()">
```
Always make sure that the expression bound via `ngModel` directive can be assigned to.
For more information, see the {@link api/ng.directive:ngModel ngModel API doc}.