Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
docs(guide/compiler): change {{user}} to {{user.name}} in example
Browse files Browse the repository at this point in the history
If user has an `actions` property, it should be an object,
which means if you {{user}}, it'll print out the object.
  • Loading branch information
Zacky Ma authored and btford committed Jun 23, 2014
1 parent 8ce61bf commit 5a306b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/content/guide/compiler.ngdoc
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand All @@ -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.
Expand Down

0 comments on commit 5a306b7

Please sign in to comment.