0

Hello I have existing web app written in django and I want to add some vue js feautures. I don't want to have all the pain with webpack, so I can stick to including vue.js as an external script like this:

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

as sugested here: https://v2.vuejs.org/v2/guide/installation.html#ad

Also I have on my page this html:

<div id="app">
    just an app
  {{ message }}
</div>

And the following inline script:

<script type="text/javascript" >
    var app = new Vue({
      el: '#app',
      data: {
        message: 'Hello Vue!'
      }
    })
</script>

But there is no message "Hello vue" on my page. As you can see on the printscreen So what do I do? enter image description here

1
  • Why are you downvoting it? I am doing as described in official tutorial, I have given a link. What's wrong with my desire not using webpack and just to add some vue.js fancy functionality? Commented May 11, 2018 at 16:31

1 Answer 1

1

I got the solution it didn't work, cause django used the same braskets as vue.js something like this {{variable}}

So I turned off django braskets: like this:

{% verbatim %}
<div id="app">
    just an app
  {{ message }}
</div>
{% endverbatim %}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.