Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Octanify readme code examples #125

Merged
merged 1 commit into from
Oct 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ Given the following DOM:
and a template like this:

```hbs
{{#ember-tether
target='#a-nice-person'
targetAttachment='top right'
attachment='top left'
}}
<EmberTether
@target='#a-nice-person'
@targetAttachment='top right'
@attachment='top left'
>
A puppy
{{/ember-tether}}
</EmberTether>
```

Then "A puppy" would be rendered alongside the `a-nice-person` div.
Expand All @@ -56,20 +56,20 @@ If the ember-tether component is destroyed, its far-off content is destroyed too
For example, given:

```hbs
{{#if isShowing}}
{{#ember-tether
target='#a-nice-person'
targetAttachment='top right'
attachment='top left'
}}
{{#if this.isShowing}}
<EmberTether
@target='#a-nice-person'
@targetAttachment='top right'
@attachment='top left'
>
A puppy
{{/ember-tether}}
</EmberTether>
{{/if}}
```

If `isShowing` starts off true and becomes false, then the "A puppy" text will be removed from the page.
If `this.isShowing` starts off true and becomes false, then the "A puppy" text will be removed from the page.

Similarly, if you use `ember-tether` in a route's template, it will
Similarly, if you use `<EmberTether />` in a route's template, it will
render its content next to the target element when the route is entered
and remove it when the route is exited.

Expand Down
Loading