node package manager

ember-dependency-lookup

ember-dependency-lookup

Travis NPM Ember

When is this useful?

When you are using pure functions but need to lookup something in the ember container

Installation

ember install ember-dependency-lookup

Usage

//app/sagas/transition.js
import { put, takeEvery } from 'redux-saga/effects';
import { lookup } from 'ember-dependency-lookup';
 
function* transitionAsync() {
  yield put({type: 'TRANSITION_START'});
  lookup('service:-routing').transitionTo('index');
}
 
export function* transition() {
  yield takeEvery('TRANSITION', transitionAsync);
}