Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
classic ember route with the redux service to dispatch with
import Ember from 'ember';
import ajax from 'example/utilities/ajax';
var UsersRoute = Ember.Route.extend({
redux: Ember.inject.service(),
model() {
var redux = this.get('redux');
return ajax('/api/users', 'GET').then(response => redux.dispatch({type: 'DESERIALIZE_USERS', response: response}));
export default UsersRoute;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment