In a components strategy, it is suggested that a component should carry all of its related pieces in one file ( template, css, and JS ) so I would not use laravel views at all! I would simply use Vue Router to go from one step to another
Vue.js Multi Step Form
Hey,
I just started working with Vue and I really like it. My first two components are build with browserfy like Jeffrey did it where the template, script and styles are all in one file. This is really handy.
Now I got another scenario where I'm not yet quite sure how to handle it with Vue. It's a big form with lots of inputs that I want to transform to a multi step form where you can navigate between the steps and only one step is shown to the user.
Here are my questions:
1.) Can I build a Vue compontent without the template in the component file? I use the Laravel view for the form for creating and updating. So there is a lot of dynamic data used. Maybe it would be ok to let Laravel handle that template and Vue just the JS part of switching what is shown. But that would mean I don't have a template part in the component file. Is that valid or is this all connected to the template.
2.) If you think you would handle the template with Vue too, why would that be the better choice? It would be more work to geht the data for the update form, guess I would need to get that via ajax instead of with Laravel like it is now.
Cheers and thx
Please or to participate in this conversation.