vue.js


Emit Events and On Vuejs 2


Hi this is my parent custom events
bus.$emit('updated-users', 'Sample Data')
My component
bus.$on('updated-users', data => this.lastname = data)
This one works.
Using Callback doesn't work.
bus.$on('updated-users', function(data){
//data is displayed in the console log.
console.log(data)
//This doesn't work.
this.fetchedUsersData()
})
I need to trigger a method but it doesn't work. I can't find any example that trigger a method. Please help.

Related Links

asyncData function on nuxtjs layout
Vue method context called from HTML [duplicate]
User editable Vue template
vuejs2 passing data between parent-child is wiping childs value
[Vue warn]: Property or method is not defined on the instance but referenced during render
dynamic jquery accordion not working in vue.js
Handle unavailable server with vue-resource
How to set v-if property from the template
v-for on indexed array
vue i18n - using it as a javascript object (not inside the template)?
How can I add condition in class on vue.js 2?
How to access bound key of Vue.js list item?
How to augment the Vue class and keep typescript definition in sync
How do I use a vue component without instantiating a root instance?
How to implement sidebar with settings for each component
Vuejs - When to use v-for? v-html?

Categories

HOME
laravel-5
sql-server
plsql
dynamics-crm
jar
wmic
drupal-7
textwatcher
docker-swarm
angular2-directives
is-empty
rfc
orientation
ext.net
jpanel
pygame
contact-form-7
jboss-eap-7
cockroachdb
google-shopping
cortex-a
spring-cloud-config
phpbb
rhapsody
arraylist
aptana
thumbnails
pycrypto
npm-install
fabric
shopping-cart
compare-and-swap
onesignal
continuous-deployment
lync-2013
interrupt-handling
edge-detection
mayavi
gzip
bitcoin-testnet
spring-profiles
fractals
broadleaf-commerce
restful-url
ttcn
amd
production-environment
tcserver
infinite-scroll
settimeout
gradle-script-kotlin
c#-interactive
rstudio-server
radians
gradle-eclipse
nssplitview
contour
uwp-maps
faraday
mongo-c-driver
mfc-feature-pack
aerogear
asp.net-mvc-2
plone-3.x
schtasks.exe
geodjango
hornetq
evo
programming-paradigms
calibration
leadtools-sdk
xjc
cpu-cores
word-2013
tilestache
mser
jstat
docopt
power-law
getimagedata
cppdepend
loop-invariant
sslexception
xslkey
prng
transitive-closure-table
pys60
continuous-testing
windows-phone-7-emulator
webkit-transform
posting
port-scanning
noir
phpcrawl
savestate
openwysiwyg
lazy-c++

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App