Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4829

Dashboard data - Routable components "arrival"

$
0
0

@Manolis_Tsilikidis wrote:

Hello everyone!

So, I have an ember app and I am building a dashboard for the users of the application. My application fetches data from a Rails json-api API ( typical :slight_smile: ). So far so good.

The issue I have is that in the dashboard I have charts, tables with data etc which are not related with a specific model in my application. Which is the best way to fetch this data. I tried something like the following at first:

model(params) {
  let projects = this.get('store').query('project', {//params//}),
      leads = this.get('store').query('lead', {//params//});
  return {projects: projects, leads: leads};
}

But in certain occasions the queries might take a long time to run. At the moment I am doing an Ajax call to fetch all the data I need for my charts etc, and in certain components I fetch the data individually inside the component. I understand that this is not the “ember way”, but it was the best working solution I could come up with.

So my questions are the following:

  1. Which is the best way to fetch all the needed data for a dashboard ( especially when it is a lot of data ) ?
  2. How about asynchronous components - routable components? Are they coming in ember ?

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4829

Trending Articles