aboutsummaryrefslogtreecommitdiffstats
path: root/docs/content/error/ngModel/nonassign.ngdoc
diff options
context:
space:
mode:
Diffstat (limited to 'docs/content/error/ngModel/nonassign.ngdoc')
-rw-r--r--docs/content/error/ngModel/nonassign.ngdoc27
1 files changed, 27 insertions, 0 deletions
diff --git a/docs/content/error/ngModel/nonassign.ngdoc b/docs/content/error/ngModel/nonassign.ngdoc
new file mode 100644
index 00000000..33894c49
--- /dev/null
+++ b/docs/content/error/ngModel/nonassign.ngdoc
@@ -0,0 +1,27 @@
+@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}.