Skip to content

Pass Ember components from one location to another (engine)

License

Notifications You must be signed in to change notification settings

knownasilya/ember-zipline

Repository files navigation

ember-zipline

Send components from one location to another declaratively. Use case is for sharing components with an ember engine isntance.

Compatibility

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

Installation

ember install ember-zipline

Usage

Define what data/components we want to send.

<EmberZipline
  @data={{hash
    UserProfile=(component 'user-profile' user=this.user)
  }}
/>

Inject the zipline service.

import Component from '@ember/component';
import { inject as service } from '@ember/service';

export default Component.extend({
  ziplineService: service('zipline')
});

Access the sent data/components via the service.

{{#let this.ziplineService.data.UserProfile as |UserProfile|}}
  <UserProfile/>
{{/let}}

Contributing

See the Contributing guide.

License

This project is licensed under the MIT License.

About

Pass Ember components from one location to another (engine)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published