1.2.0 • Published 7 years ago

ember-lookup v1.2.0

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

ember-lookup

Latest NPM release TravisCI Build Status Ember Observer Score

This provides a helper that allows using Ember.getOwner()#lookup from templates.

Installation

ember install ember-lookup

Usage

Lookup a service

By default, ember-lookup will lookup a service.

{{#with (lookup 'my-service') as |myService|}}
  {{! use service }}
{{/with}}

Lookup anything registered with ember

The type of the object to lookup may be provided as the second parameter.

{{#with (lookup 'environment' 'config') as |config|}}
  {{! use config }}
{{/with}}
{{#with (lookup 'foo' 'bar') as |foo|}}
  {{! use foo of type bar }}
{{/with}}

If using ember-let

{{let myService=(lookup 'my-service')}}

Credit where credit is due

Basically copied from this issue by rwjblue in ember-with-service.

Running Tests

  • npm test (Runs ember try:each to test your addon against multiple Ember versions)
  • ember test
  • ember test --server

Building

  • ember build

For more information on using ember-cli, visit https://ember-cli.com/.

1.2.0

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago