Skip to content

Instantly share code, notes, and snippets.

@duwaljyoti
Created November 15, 2017 12:07
Show Gist options
  • Select an option

  • Save duwaljyoti/1279a5ce0ed4e8a4ead76c708e5aa1bb to your computer and use it in GitHub Desktop.

Select an option

Save duwaljyoti/1279a5ce0ed4e8a4ead76c708e5aa1bb to your computer and use it in GitHub Desktop.
import Vue from 'vue';
import VueRouter from 'vue-router';
import NoteApp from './components/NoteApp.vue';
import routes from './routes';
import notesStore from './store/notesStore';
Vue.use(VueRouter);
const router = new VueRouter({
routes
});
window.events = new Vue();
window.flash = function(message, type = 'success') {
window.events.$emit('flash', message, type);
};
new Vue({
el: '#app',
render: h => h(NoteApp),
router,
store: notesStore,
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment