
From this article, we have learned how we can handle vue.js data as well as components in Node.js. We have also learned how we can implement them in Node.js with examples. From the above article, we have learned the basic syntax of the vue.js data function. We hope from this article you have understood about the vue.js data. Illustrate the end result of the above declaration by using the use of the following snapshot. In this example we by default content of vue. The remaining part is the css part this necessary for design purpose. We also define a setMessage function to handle custom events. In this file, we import the HelloWorld.vue component for listening to custom events by using changeMsg function. In the first component, we just send messages from the child component to the parent component but in this we actually manipulate them. StartMsg: "Welcome in Data function World"įont-family: "Avenir", Helvetica, Arial, sans-serif Įxplanation: In this file actually we are listing our event. Import HelloWorld from "./components/HelloWorld.vue"
Webkit font smoothing code#
Then we added the following code in the App.vue file See in this template we use the changes function whenever we submit a message to the parent component. In the above template, we use a button to send the message to the parent component. Source Code for HelloWorld.vue as follows.Ĭonsole.log('message emit from child component')Įxplanation: In the above component, we sent messages from the child component to the parent component.

Return 'Coding done by' +this.name1 +''+ this.name2įont-family: Avenir, Helvetica, Arial, sans-serif Įxplanation: This is another simple example of data function with methods.

Inside the method, we access data object property by using this and finally we added in the template tag. Here we create a Msgmethod which returns a string. In the second part of the program we have created a method and the method also has an object. Template: 'hit clicked double curly to pass javaScript Expression.
Webkit font smoothing software#
Web development, programming languages, Software testing & others Start Your Free Software Development Course
