lundi 15 février 2016

Does Ember need a route to be generated for every screen

I am having the following scenario;

There are multiple workflows. Take workflow1 It is a 3-step workflow with user input form on Step 1. So I have created a route for this /workflow1/step1

Now on this step1 form, I have a field (lookup value) & button next to it, on click of which, I need to show a new screen (this would entirely replace step1 screen). On this screen is again a form (kind of filter) and user can filter based on this lookup form and select any data.

The selected user data would populate the value in the step1 "lookup" field.

No my questions are, what is the best way to implement this lookup screen.

  1. Do I have to create a new route (say /lookup) i.e. at root level and implement it ?
  2. This lookup screen is going to get called from multiple places (say from workflow2, workflow3) and it's behavior is going to be identical in all cases. Only difference being it's selected value is going to the step1 of the calling workflow. (i.e. it can be /workflow1/step1 OR /workflow2/step1)
  3. Is there any way in Ember, by which I can implement such kind of screens, without necessarily having to generate a separate route for it ?



Aucun commentaire:

Enregistrer un commentaire