vuejs push data update parent
<!--
From the child component, you want to do an "emit". This tells the
parent to run a function which is specified in the child component
reference. Using Pseudo code here:
-->
<parent>
<child
:child-data="data"
@updateParentData="updateData">
</child>
<ChildScript>
methods: {
updateParentData() {
Vue.$emit('updateParentData', childData);
}
}
</ChildScript>
</parent>
<ParentScript>
methods: {
updateData(childData) {
// Do some stuff with child data
}
}
</ParentScript>
Also in HTML:
- how to add javascript in html
- <!DOCTYPE html> <html> <head> <title>Page TitlePage TitlePage TitlePage TitlePage TitlePage TitleMy WebsitePage TitlePage Title
- html progress bar
- what is the meaning of the table innerhtml in javascript
- html-webpack-plugin npm
- how to break the line in html
- start html
- how to fix portrait orientation for android apps
- visual studio code html template shortcut
- excel number format hide values
- submit html
- how to add multiple videos in html5 with javascript
- login form in html
- input html
- html em tag
- pattern in html input
- include javascript jquery file in html
- bootstrap grid
- xss commands
- liens hypertexte html mdn
- js html elements dom cheet sheet
- html set icon
- link javascript to html
- about ul and li tag