1

below is my code by using vue.js I have written thee code and here my problem is while i am running this code in notepad++ it is working fine but while i am working with django project at pycharm it is not giving any output. As you can I have interpolated message, so its is giving me the output at notepad++ but not in pycharm with django project if anyone have an idea about this please help me struggling a lot for this

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>

<div id="app">
<% message %>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>

<script>
var app = new Vue({
el: '#app',
data: {
message: 'Hello world!',
delimiters: ["<%","%>"]
}
});

</script>
</body>
</html>

1 Answer 1

1

delimiters shouldn't be inside data

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>

<div id="app">
<% message %>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>

<script>
var app = new Vue({
el: '#app',
data: {
message: 'Hello world!',
},
delimiters: ["<%","%>"]
});

</script>
</body>
</html>
Sign up to request clarification or add additional context in comments.

2 Comments

You are running Vue in development mode. Make sure to turn on production mode when deploying for production. See more tips at vuejs.org/guide/deployment.html i am facing this error while i am running the code
@sonu wait that's must not be an error that's must be a notification though but still if you want to disable that you can just add this line at the end of the script Vue.config.productionTip = false

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.