A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.npmjs.com/package/vue-tabevents below:

vue-tabevents - npm

vue-tabevents

Easy communication between tabs for Vue 2.x

Getting Started Installing

Install with npm:

npm install --save vue-tabevents

import into project:

import Vue from 'vue';

import vueTabevents from 'vue-tabevents';

 

Vue.use(vueTabevents);

Usage

To an emit event to other tabs

this.$tabEvent.emit('eventName');

const data = {
    name: 'Ali'
    phone: 123
}

this.$tabEvent.emit('eventName', data);

To listen for events emitted by other types

this.$tabEvent.on('eventName', callback);

this.$tabEvent.on('eventName', (data) => console.log(data));

To stop listening to an event

this.$tabEvent.off('eventName');
Authors License

This project is licensed under the MIT License - see the LICENSE.md file for details


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4