Skip to content

Commit

Permalink
Converted link-to, input to angle bracket syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
zachgarwood authored and lenoraporter committed Jul 19, 2020
1 parent 0f78a0d commit 08ecc09
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions guides/release/tutorial/autocomplete-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ In this case we are passing, or "yielding", our filter data to the inner markup
<p>
We hope you find exactly what you're looking for in a place to stay.
</p>
{{#link-to "about" class="button"}}
<LinkTo @route="about" class="button">
About Us
{{/link-to}}
</LinkTo>
</div>
<ListFilter
Expand All @@ -57,19 +57,19 @@ as |filteredResults|
We want the component to simply provide an input field and yield the results list to its block, so our template will be simple:

```handlebars {data-filename=app/templates/components/list-filter.hbs}
{{input
value=this.value
key-up=(action "handleFilterEntry")
<Input
@value=this.value
@key-up=(action "handleFilterEntry")
class="light"
placeholder="Filter By City"
}}
>
{{yield this.results}}
```

The template contains an [`{{input}}`](../../templates/input-helpers/) helper that renders as a text field, in which the user can type a pattern to filter the list of cities used in a search.
The `value` property of the `input` will be kept in sync with the `value` property in the component.
The template contains an [`<Input>`](../../templates/input-helpers/) helper that renders as a text field, in which the user can type a pattern to filter the list of cities used in a search.
The `value` property of the `Input` will be kept in sync with the `value` property in the component.

Another way to say this is that the `value` property of `input` is [**bound**](../../object-model/bindings/) to the `value` property of the component.
Another way to say this is that the `value` property of `Input` is [**bound**](../../object-model/bindings/) to the `value` property of the component.
If the property changes, either by the user typing in the input field, or by assigning a new value to it in our program,
the new value of the property is present in both the rendered web page and in the code.

Expand Down

0 comments on commit 08ecc09

Please sign in to comment.