8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 64d0518 commit b2ae35cCopy full SHA for b2ae35c
docs/content/error/$compile/nonassign.ngdoc
@@ -36,9 +36,25 @@ Following are invalid uses of this directive:
36
```
37
38
39
-To resolve this error, always use path expressions with scope properties that are two-way data-bound:
+To resolve this error, do one of the following options:
40
+
41
+- use path expressions with scope properties that are two-way data-bound like so:
42
43
44
<my-directive bind="some.property">
45
<my-directive bind="some[3]['property']">
46
47
48
+- Make the binding optional
49
50
+```
51
+myModule.directive('myDirective', function factory() {
52
+ return {
53
+ ...
54
+ scope: {
55
+ localValue: '=?bind' // <-- the '?' makes it optional
56
+ }
57
58
59
+});
60
0 commit comments