v-html
This commit is contained in:
parent
ffaec02119
commit
78e0c132e7
3
app.js
3
app.js
@ -2,7 +2,8 @@ var app = new Vue({
|
|||||||
el: '#app',
|
el: '#app',
|
||||||
data: {
|
data: {
|
||||||
title: "Hello World",
|
title: "Hello World",
|
||||||
link: "https://google.com"
|
link: "https://google.com",
|
||||||
|
finishedLink: '<a href="http://google.com/">Google</a>'
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
sayHello(){
|
sayHello(){
|
||||||
|
@ -9,6 +9,8 @@
|
|||||||
<div id='app'>
|
<div id='app'>
|
||||||
<h1 v-once>{{title}}</h1>
|
<h1 v-once>{{title}}</h1>
|
||||||
<p>{{ sayHello() }}</p> - <a v-bind:href="link">Google</a>
|
<p>{{ sayHello() }}</p> - <a v-bind:href="link">Google</a>
|
||||||
|
|
||||||
|
<p v-html="finishedLink"></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="app.js" charset="utf-8"></script>
|
<script src="app.js" charset="utf-8"></script>
|
||||||
|
Loading…
Reference in New Issue
Block a user