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

Commit ea820b5

Browse files
Zacky Mabtford
Zacky Ma
authored andcommitted
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.
1 parent 05ec6cc commit ea820b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/content/guide/compiler.ngdoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ moved to the compile function for performance reasons.
226226
To understand, let's look at a real-world example with `ngRepeat`:
227227

228228
```html
229-
Hello {{user}}, you have these actions:
229+
Hello {{user.name}}, you have these actions:
230230
<ul>
231231
<li ng-repeat="action in user.actions">
232232
{{action.description}}
@@ -236,7 +236,7 @@ Hello {{user}}, you have these actions:
236236

237237
When the above example is compiled, the compiler visits every node and looks for directives.
238238

239-
`{{user}}` matches the {@link ng.$interpolate interpolation directive}
239+
`{{user.name}}` matches the {@link ng.$interpolate interpolation directive}
240240
and `ng-repeat` matches the {@link ng.directive:ngRepeat `ngRepeat` directive}.
241241

242242
But {@link ng.directive:ngRepeat ngRepeat} has a dilemma.

0 commit comments

Comments
 (0)