Instructor: 00:00 I would like to bind the event with button, so Vue provides the v-on directive, v-on. I would like to use the click binder. Here, we need to specify our function me, greetMe. Let's say I'm going to create greetMe.
00:17 I did not create the method here, so how can you create method in the Vue instance? There is a methods property. I need to define all my methods inside this object. Let's say greetMe. It's a function. Do not use arrow function.
00:35 I'm going to replace this.message, is equals to, let's say, I'm going to say, "Hello Vue dev." Let's try to test it. Boom. Now, you will see message, "Hello Vue dev." You can also use a shorthand syntax. Let's try to do it, "Hello Vue dev."
00:58 You can also access this greetMe message from this Vue instance. Let me show you how can you access it? app.greetMe. Now, it's a function. You can see that it's a function here. You can also fetch the data property by this message.
01:16 Let's say if you say app.message, you will see this message, "Hello Vue dev," because we have changed the message here. You can also get the data property by using this one, app.data. It's an observer.
01:30 Here, you will see all your message. Let's say app.data.message. You will see this, "Hello Vue dev." If I change this, "Hello Vue dev."