mardi 6 novembre 2018

emberjs loading spinner with findRecord

EmberJS 3.4

I'm loading a Project entity from a backend which takes a couple of seconds. Now I would like to show a spinner during loading.

as described I created a project-loading.hbs. https://guides.emberjs.com/release/routing/loading-and-error-substates/

project model class:

export default AuthenticatedRoute.extend({
  model(params) {
    return this.store.findRecord("project", params.projectname);
  },

  actions: {
    refresh: function() {
      this.refresh();
    }
  }
});

though it takes time to load the entity, the loading template seems not to be rendered/shown. Am I doing something wrong ?




Aucun commentaire:

Enregistrer un commentaire