mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-28 21:05:43 +08:00
@@ -152,9 +152,10 @@ Similarly, invoking a function `a.b.c()` on `undefined` or `null` simply returns
|
|||||||
|
|
||||||
## No Control Flow Statements
|
## No Control Flow Statements
|
||||||
|
|
||||||
You cannot write a control flow statement in an expression. The reason behind this is core to the
|
Apart from the ternary operator (`a ? b : c`), you cannot write a control flow statement in an
|
||||||
Angular philosophy that application logic should be in controllers, not the views. If you need a
|
expression. The reason behind this is core to the Angular philosophy that application logic should
|
||||||
conditional, loop, or to throw from a view expression, delegate to a JavaScript method instead.
|
be in controllers, not the views. If you need a real conditional, loop, or to throw from a view
|
||||||
|
expression, delegate to a JavaScript method instead.
|
||||||
|
|
||||||
## `$event`
|
## `$event`
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user