When and where may I load data, from a remote API, in my Ember.js application? -
i'm learning ember.js, , writing application want perform following tasks ... load data local storage check 3rd party api new additional data append additional , save entire thing local storage display table of data my application single route. i'm using ember.route 's model hook load data local storage. spot check 3rd party api new data, though? should in model hook? i'd able display sort of loading icon during query 3rd party api , i'm not sure if model hook allow me this? right now, route contains following code ... app.historyroute = ember.route.extend({ model: function (params) { // initialize model var model = { summoner: params, history: [] }; if (typeof(localstorage.history) == 'undefined') return model; // fetch data local storage var history = json.parse(localstorage.history); // check existing data if (!history.hasownkey(params.region) || !history[par...