Skip to content

Commit 0c1380b

Browse files
petebacondarwinRichardLitt
authored andcommitted
docs(guide/expression): mention the ternary operator
Closes angular#6498
1 parent 9bbd5c1 commit 0c1380b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/content/guide/expression.ngdoc

+4-3
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,10 @@ Similarly, invoking a function `a.b.c()` on `undefined` or `null` simply returns
152152

153153
## No Control Flow Statements
154154

155-
You cannot write a control flow statement in an expression. The reason behind this is core to the
156-
Angular philosophy that application logic should be in controllers, not the views. If you need a
157-
conditional, loop, or to throw from a view expression, delegate to a JavaScript method instead.
155+
Apart from the ternary operator (`a ? b : c`), you cannot write a control flow statement in an
156+
expression. The reason behind this is core to the Angular philosophy that application logic should
157+
be in controllers, not the views. If you need a real conditional, loop, or to throw from a view
158+
expression, delegate to a JavaScript method instead.
158159

159160
## `$event`
160161

0 commit comments

Comments
 (0)