vendredi 18 novembre 2016

Are components intended for data creation in Ember.js?

I am new to Ember and trying to get my head around all this new Ember concepts.

Currently I am struggling in finding the best way for data creation.

What I want to do is, create a file upload that creates a model instance at the same time by accessing a micro service with two AJAX calls.

Because this upload form should be used in several places, a components seems the right choice.

So how would one build a component that does this?

  1. Should I create a component and perform the AJAX calls there while bypassing Ember Data?
  2. Should I handle over some model data to the component and do the AJAX calls via the model's data adapter?
  3. Am I completely wrong here and there is another way?

Thanks, any help is appreciated.




Aucun commentaire:

Enregistrer un commentaire