Skip to content

Commit

Permalink
Octanify readme code examples
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeAstapov committed Oct 1, 2023
1 parent 9da2e6a commit c0dc2a7
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions README.md
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

0 comments on commit c0dc2a7

Please sign in to comment.