ember-dependency-lookup
v2.0.1
Published
Provides a simple container lookup function for non ember aware contexts
Downloads
98
Readme
ember-dependency-lookup
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);
}