Skip to content

An add-on that provides helpers related to the application instance.

License

Notifications You must be signed in to change notification settings

ember-sapporo/ember-owner-helpers

Repository files navigation

ember-owner-helpers

An add-on that provides helpers related to the application instance.

Compatibility

  • Ember.js v3.4 or above
  • Ember CLI v2.13 or above
  • Node.js v8 or above

Installation

ember install ember-owner-helpers

Usage

{{owner/lookup 'service:foo'}}

For details on how to use the lookup method, see the document of Ember.ContainerProxyMixin.

A helper to look up the service is also available. It is just for convenience and does not do special things.

{{owner/lookup-service 'foo'}}

Example: Use with ember-toastr

<form onsubmit={{pipe-action (action (invoke 'save' model)) (action (invoke 'success' 'Saved.' (owner/lookup-service 'toast')))}}>
  ...
</form>

Note: pipe-action and invoke are provided by ember-composable-helpers.

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

About

An add-on that provides helpers related to the application instance.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •