This commit is contained in:
Tyrel Souza 2018-04-13 13:20:21 -04:00
parent c134f13cec
commit c147f918bd
No known key found for this signature in database
GPG Key ID: 5A9394D4C30AEAC0
2 changed files with 4 additions and 6 deletions

6
app.js
View File

@ -3,9 +3,9 @@ var app = new Vue({
data: { data: {
title: "Hello world." title: "Hello world."
}, },
methods:{ methods: {
changeTitle(event){ sayHello(){
this.title = event.target.value return "Hello";
} }
} }
}) })

View File

@ -7,11 +7,9 @@
</head> </head>
<body> <body>
<div id='app'> <div id='app'>
<input type="text" v-on:input="changeTitle"> <p>{{ sayHello() }}</p>
<p>{{ title }}</p>
</div> </div>
<script src="app.js" charset="utf-8"></script> <script src="app.js" charset="utf-8"></script>
</body> </body>