Skip to content

An Ember component for quickly injecting services into templates.

License

Notifications You must be signed in to change notification settings

rtablada/ember-with-service

Repository files navigation

Ember-with-service

npm version Ember Observer Score This README outlines the details of collaborating on this Ember addon.

Installation

  • ember install ember-with-service

Use

Let's say we wanted to inject the session service into our template:

<nav>
  {{#with-service 'session' as |session|}}
    <ul>
      {{#if session.isAuthenticated}}
        <li>{{#link-to 'logout'}}Logout{{/link-to}}</li>
      {{/if}}
    </ul>
  {{/with-service}}
</nav>

About

An Ember component for quickly injecting services into templates.

Resources

License

Stars

Watchers

Forks

Packages

No packages published