diff options
| author | Matt Rohrer | 2012-09-26 15:30:55 +0200 | 
|---|---|---|
| committer | Brian Ford | 2013-01-17 19:10:46 -0500 | 
| commit | 93070f14885801de7e264b04fdf4cb54b7dc7d9b (patch) | |
| tree | 9a96a5e4c8ea0e18dc775c2b92bc148c57c00a87 /docs/content/guide/expression.ngdoc | |
| parent | 3c8583e5dd10ff356ac473f53e920fb10eb41571 (diff) | |
| download | angular.js-93070f14885801de7e264b04fdf4cb54b7dc7d9b.tar.bz2 | |
docs(guide): minor grammar fixes
Diffstat (limited to 'docs/content/guide/expression.ngdoc')
| -rw-r--r-- | docs/content/guide/expression.ngdoc | 19 | 
1 files changed, 9 insertions, 10 deletions
| diff --git a/docs/content/guide/expression.ngdoc b/docs/content/guide/expression.ngdoc index 469381ff..59839c63 100644 --- a/docs/content/guide/expression.ngdoc +++ b/docs/content/guide/expression.ngdoc @@ -15,10 +15,9 @@ For example, these are all valid expressions in angular:  ## Angular Expressions vs. JS Expressions -It might be tempting to think of angular view expressions as JavaScript expressions, but that is -not entirely correct, since angular does not use a JavaScript `eval()` to evaluate expressions. -You can think of angular expressions as JavaScript expressions with following differences -differences: +It might be tempting to think of Angular view expressions as JavaScript expressions, but that is +not entirely correct, since Angular does not use a JavaScript `eval()` to evaluate expressions. +You can think of Angular expressions as JavaScript expressions with following differences:    * **Attribute Evaluation:** evaluation of all properties are against the scope, doing the      evaluation, unlike in JavaScript where the expressions are evaluated against the global @@ -92,9 +91,9 @@ You can try evaluating different expressions here:  # Property Evaluation  Evaluation of all properties takes place against a scope. Unlike JavaScript, where names default -to global window properties, angular expressions have to use {@link api/ng.$window +to global window properties, Angular expressions have to use {@link api/ng.$window  `$window`} to refer to the global `window` object. For example, if you want to call `alert()`, which is -defined on `window`, in an expression must use `$window.alert()`. This is done intentionally to +defined on `window`, in an expression you must use `$window.alert()`. This is done intentionally to  prevent accidental access to the global state (a common source of subtle bugs).  <doc:example> @@ -148,7 +147,7 @@ Similarly, invoking a function `a.b.c()` on undefined or null simply returns und  ## No Control Flow Statements  You cannot write a control flow statement in an expression. The reason behind this is core to the -angular philosophy that application logic should be in controllers, not in the view. If you need a +Angular philosophy that application logic should be in controllers, not in the view. If you need a  conditional, loop, or to throw from a view expression, delegate to a JavaScript method instead. @@ -179,9 +178,9 @@ You might be wondering, what is the significance of the $ prefix? It is simply a  angular uses, to differentiate its API names from others. If angular didn't use $, then evaluating  `a.length()` would return undefined because neither a nor angular define such a property. -Consider that in a future version of angular we might choose to add a length method, in which case +Consider that in a future version of Angular we might choose to add a length method, in which case  the behavior of the expression would change. Worse yet, you the developer could create a length -property and then we would have a collision. This problem exists because angular augments existing +property and then we would have a collision. This problem exists because Angular augments existing  objects with additional behavior. By prefixing its additions with $ we are reserving our namespace -so that angular developers and developers who use angular can develop in harmony without collisions. +so that angular developers and developers who use Angular can develop in harmony without collisions. | 
