I
I
Igor Bezlepkin2018-08-28 09:26:31
JavaScript
Igor Bezlepkin, 2018-08-28 09:26:31

How to call a method from main.js in Vue + Framework7?

Hey! I can’t figure out how to call $f7.router.navigate in the main.js file, where all libraries are connected

// Import Vue
import Vue from 'vue'
// Import Vue-Resource
import Resource from 'vue-resource'
// Import F7
import Framework7 from 'framework7/framework7.esm.bundle.js'
// Import F7 Vue Plugin
import Framework7Vue from 'framework7-vue/framework7-vue.esm.bundle.js'
// Import F7 Styles
// eslint-disable-next-line
import Framework7Styles from 'framework7/css/framework7.css'
// Import Icons and App Custom Styles
// eslint-disable-next-line
import IconsStyles from './css/icons.css'
// eslint-disable-next-line
import AppStyles from './css/app.css'
import store from './store'
import user from './user'
// Import App Component
import App from './app'

// Init F7 Vue Plugin
Framework7.use(Framework7Vue)
Vue.use(Resource)
// тут
this.$f7.router.navigate()

I tried all the options :)
I don’t have enough knowledge in the field of js :)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Tikhonov, 2018-09-03
@mylp

try connecting this module to Vue:
Vue.use(Framework7)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question