Skip to content

Commit eed869c

Browse files
TedHopptjvantoll
authored andcommitted
Update chapter-4.md
Fix name of function in the narrative.
1 parent 722445d commit eed869c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tutorial/chapter-4.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ exports.loaded = function(args) {
272272

273273
<div class="exercise-end"></div>
274274

275-
Here, you're creating a new Observable object called `pageData`, which you set as the page's `bindingContext` in the `load()` function. Inside the Observable, you set a single `"groceryList"` property to be a new instance of the ObservableArray class. Notice how the `"groceryList"` property corresponds to `<ListView items="{% raw %}{{ groceryList }}{% endraw %}">`, and each array entry's `"name"` property corresponds to `<Label text="{% raw %}{{ name }}{% endraw %}">`.
275+
Here, you're creating a new Observable object called `pageData`, which you set as the page's `bindingContext` in the `loaded()` function. Inside the Observable, you set a single `"groceryList"` property to be a new instance of the ObservableArray class. Notice how the `"groceryList"` property corresponds to `<ListView items="{% raw %}{{ groceryList }}{% endraw %}">`, and each array entry's `"name"` property corresponds to `<Label text="{% raw %}{{ name }}{% endraw %}">`.
276276

277277
> **NOTE**: Notice how this example uses the observable module’s `fromObject()` method instead of the `Observable` class constructor. Both `observableModule.fromObject()` and `new Observable()` create a new `Observable` instance, however, the `fromObject()` method performs a bit of additional initialization to handle nested objects. This example uses `fromObject()` because the `pageData` observable object contains a nested `ObservableArray`.
278278

0 commit comments

Comments
 (0)