docs(guide/compiler): change {{user}} to {{user.name}} in example

If user has an `actions` property, it should be an object,
which means if you {{user}}, it'll print out the object.
This commit is contained in:
Zacky Ma
2014-06-16 14:07:30 -07:00
committed by Brian Ford
parent 8ce61bf178
commit 5a306b7ba3

View File

@@ -226,7 +226,7 @@ moved to the compile function for performance reasons.
To understand, let's look at a real-world example with `ngRepeat`:
```html
Hello {{user}}, you have these actions:
Hello {{user.name}}, you have these actions:
<ul>
<li ng-repeat="action in user.actions">
{{action.description}}
@@ -236,7 +236,7 @@ Hello {{user}}, you have these actions:
When the above example is compiled, the compiler visits every node and looks for directives.
`{{user}}` matches the {@link ng.$interpolate interpolation directive}
`{{user.name}}` matches the {@link ng.$interpolate interpolation directive}
and `ng-repeat` matches the {@link ng.directive:ngRepeat `ngRepeat` directive}.
But {@link ng.directive:ngRepeat ngRepeat} has a dilemma.