@@ -26,8 +26,16 @@ Angular expressions are like JavaScript expressions with the following differenc
26
26
* **Forgiving:** In JavaScript, trying to evaluate undefined properties generates `ReferenceError`
27
27
or `TypeError`. In Angular, expression evaluation is forgiving to `undefined` and `null`.
28
28
29
- * **No Control Flow Statements:** you cannot use the following in an Angular expression:
29
+ * **No Control Flow Statements:** You cannot use the following in an Angular expression:
30
30
conditionals, loops, or exceptions.
31
+
32
+ * **No Function Declarations:** You cannot decleare functions in an Angular expression.
33
+ Even inside `ng-init` directive
34
+
35
+ * **No RegExp Creation With Literal Notation:** You cannot create regular expressions
36
+ in an Angular expression.
37
+
38
+ * **No Comma And Void Operators:** You cannot use `,` or `void` in an Angular expression.
31
39
32
40
* **Filters:** You can use {@link guide/filter filters} within expressions to format data before
33
41
displaying it.
@@ -164,11 +172,11 @@ expression. The reason behind this is core to the Angular philosophy that applic
164
172
be in controllers, not the views. If you need a real conditional, loop, or to throw from a view
165
173
expression, delegate to a JavaScript method instead.
166
174
167
- ## No RegExp creation with literal notation
175
+ ## No function declarations or RegExp creation with literal notation
168
176
169
- You can't create regular expressions from within AngularJS expressions. This is to avoid complex
170
- model transformation logic inside templates. Such logic is better placed in a controller or in a dedicated
171
- filter where it can be tested properly.
177
+ You can't declare functions or create regular expressions from within AngularJS expressions. This is
178
+ to avoid complex model transformation logic inside templates. Such logic is better placed in a
179
+ controller or in a dedicated filter where it can be tested properly.
172
180
173
181
## `$event`
174
182
0 commit comments