import Ember from 'ember';
import request from 'ic-ajax';
export default Ember.Route.extend({
model: function() {
return request('/api/friends').then(function(data) {
return {
friendsCount: data.friends.length
};
});
}
});
But the request inside the model function won't resolve. We're also using api/v2 at this point of the book. I've specified the host on adapters/application.js but nothing; using
At page 84 we're given this code:
But the request inside the model function won't resolve. We're also using api/v2 at this point of the book. I've specified the host on adapters/application.js but nothing; using
fixed it though, in case somebody has the same error.