S
S
Sergey2018-07-24 09:08:39
Vue.js
Sergey, 2018-07-24 09:08:39

Using vue js components in normal website how?

Let's say the backend renders a regular page in which you want to use several vue components. What are the use cases?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Sokolov, 2018-07-24
@sergiks

Enable vue script:

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js"></script>

Use a component in the body of the document.

R
Rikcon, 2018-07-24
@Rikcon

in your js file just Vue.component('component name', {
})
https://ru.vuejs.org/v2/guide/components.html
Read here, or did I not understand the question?

A
Anton Anton, 2018-07-24
@Fragster

You can insert the template as <script type="text/x-template"> https://ru.vuejs.org/v2/guide/components-edge-case... , like this: https://codepen.io/anon/pen/oMWNrm
Removing to separate files through the attribute srcworks .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question