T
T
thorii2017-08-20 21:18:05
JavaScript
thorii, 2017-08-20 21:18:05

What is the best way to store templates in Vue.js?

What is the most practical way to build a page with vue.js?
Store the template code in the template variable of the script or describe the framework in HTML initially and hang vue ID on the elements?
The x-template option seems more perverse than anything to me!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
N
Negwereth, 2017-08-20
@thorii

Single-file component - by far the best I've objectively worked with

E
Evgeny Kulakov, 2017-08-20
@kulakoff Vue.js

I agree, separate vue files are the best option. I would choose other options only if you cannot use the collector for some reason.

K
Konstantin Kitmanov, 2017-08-21
@k12th

*.vue files are very convenient - templates, styles and code are in one place (and all with preprocessor support). Fewer open tabs in the IDE, easier to navigate. IDEs are already more or less supported (WebStorm is fine, Visual Studio Code is worse, I don’t know the rest).
Just take some ready-made boilerplate, manually setting up a webpack is not very fun.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question