All Projects → yapplabs → Ember Tether

yapplabs / Ember Tether

Licence: mit
Tether an element to another element in the DOM

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Ember Tether

Ember Cli Bundle Analyzer
Analyze the size and contents of your Ember app's bundles
Stars: ✭ 78 (-32.76%)
Mutual labels:  ember-cli, ember
Ember Cli Eslint
Ember CLI addon for linting Ember projects with ESLint
Stars: ✭ 116 (+0%)
Mutual labels:  ember-cli, ember
Ember Decorators
Useful decorators for Ember applications.
Stars: ✭ 360 (+210.34%)
Mutual labels:  ember-cli, ember
Ember Exam
Run your tests with randomization, splitting, and parallelization for beautiful tests.
Stars: ✭ 262 (+125.86%)
Mutual labels:  ember-cli, ember
Ember Cli Updater
ember-cli addon to help you update your ember-cli application or addon.
Stars: ✭ 32 (-72.41%)
Mutual labels:  ember-cli, ember
Ember Cli Page Object
This ember-cli addon eases the construction of page objects on your acceptance and integration tests
Stars: ✭ 272 (+134.48%)
Mutual labels:  ember-cli, ember
Ember Engines
Composable Ember applications for ambitious user experiences
Stars: ✭ 484 (+317.24%)
Mutual labels:  ember-cli, ember
git-task-list
Git Task Lists
Stars: ✭ 25 (-78.45%)
Mutual labels:  ember-cli, ember
Mber
Fast and minimal Ember.js CLI alternative, without broccoli.
Stars: ✭ 30 (-74.14%)
Mutual labels:  ember-cli, ember
Rfcs
RFCs for changes to Ember
Stars: ✭ 731 (+530.17%)
Mutual labels:  ember-cli, ember
ember-credit-card
"make your credit card form dreamy in one line of code"
Stars: ✭ 89 (-23.28%)
Mutual labels:  ember-cli, ember
Ember Cli Stripe
Stripe checkout for Ember
Stars: ✭ 84 (-27.59%)
Mutual labels:  ember-cli, ember
ember-polaris
An Ember addon for Shopify's Polaris design system
Stars: ✭ 59 (-49.14%)
Mutual labels:  ember-cli, ember
Ember Cli
The Ember.js command line utility
Stars: ✭ 3,314 (+2756.9%)
Mutual labels:  ember-cli, ember
ember-luxon
🕐 🌐 [deprecated] Addon thats brings Luxon to Ember applications.
Stars: ✭ 20 (-82.76%)
Mutual labels:  ember-cli, ember
Ember Infinity
⚡️ Simple, flexible Infinite Scroll for Ember CLI Apps.
Stars: ✭ 368 (+217.24%)
Mutual labels:  ember-cli, ember
cli-guides
Step-by-step guides and tutorials for using the ember-cli to create apps and addons
Stars: ✭ 22 (-81.03%)
Mutual labels:  ember-cli, ember
ember-cli-new-version
A convention based update notification for Ember. With this addon, you can detect a new version and notify the user to refresh the page
Stars: ✭ 22 (-81.03%)
Mutual labels:  ember-cli, ember
Sharedrop
Easy P2P file transfer powered by WebRTC - inspired by Apple AirDrop
Stars: ✭ 5,222 (+4401.72%)
Mutual labels:  ember-cli, ember
Ember Simple Auth Auth0
Auth0 + lock.js, built on ember-simple-auth
Stars: ✭ 53 (-54.31%)
Mutual labels:  ember-cli, ember

Ember Tether Build Status Ember Observer Score

This ember-cli addon provides a component that allows for 'tethering' a block to a target somewhere else on the page. The target may be an element, an element selector, or an Ember view. Importantly, the component retains typical context for Ember action handling and data binding.

Compatibility

  • Ember.js v2.4 or above
  • Ember CLI v2.13 or above

For Ember 1.13 - 2.3, use 0.4.1. For support for earlier versions of Ember, use ember-tether 0.3.1.

Installation

Live Demo

View a live demo here: http://yapplabs.github.io/ember-tether/

Installation

ember install ember-tether

Note: Ember CLI versions < 0.2.3 should use ember install:addon instead of ember install

Example Usage

Given the following DOM:

<body class="ember-application">
  <div id="a-nice-person">
    Nice person
  </div>
  <div class="ember-view">
    <!-- rest of your Ember app's DOM... -->
  </div>
</body>

and a template like this:

{{#ember-tether
    target='#a-nice-person'
    targetAttachment='top right'
    attachment='top left'
}}
  A puppy
{{/ember-tether}}

Then "A puppy" would be rendered alongside the a-nice-person div.

If the ember-tether component is destroyed, its far-off content is destroyed too. For example, given:

{{#if isShowing}}
  {{#ember-tether
      target='#a-nice-person'
      targetAttachment='top right'
      attachment='top left'
  }}
    A puppy
  {{/ember-tether}}
{{/if}}

If 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 render its content next to the target element when the route is entered and remove it when the route is exited.

Acceptance Testing

Tether works by appending tethered elements to the <body> tag. Unfortunately, this moves your content outside of the Ember application rootElement during acceptance testing. This breaks event dispatch and action handling, including traditional Ember test helpers like click.

As of version 0.4.0, we can configure a different element to be used instead of body. This can be useful for Ember tests.

// config/environment.js

ENV['ember-tether'] = {
  bodyElementId: 'ember-testing'
};

It is also possible to pass a bodyElement to a particular ember-tether component declaration.

License

  • Ship Shape Tether, the underlying library that implement the actual tethering behavior
  • ember-wormhole, whose pattern for element content manipulation inspired the approach in ember-tether
  • Tetherball, for providing countless hours of entertainment over the past century
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].