P
P
PetrTar2019-05-21 07:06:41
Bitrix24
PetrTar, 2019-05-21 07:06:41

How to open the default page in the Bitrix24 application on vuejs with Router?

Good afternoon. There is an application in Bitrix24 on vuejs, the transition between components is made through vue Router. Everything works, but when the application starts, the default component does not open.
Router settings:

import Vue from 'vue'
import Router from 'vue-router'

import activeTasks from '../components/activeTasks'
import taskForDay from '../components/taskForDay'

Vue.use(Router)

export default new Router({
    mode: 'history',
    routes: [
        {
            path: '/',
            component: activeTasks
        },
        {
            path: '/taskForDay',
            component: taskForDay
        }
    ]
})

In App.js
<b-navbar type="dark" variant="primary" class="mb-2">
            <b-navbar-nav>
                <b-nav-item to="/" active-class="active" exact>Активные задачи</b-nav-item>
                <b-nav-item  to="/taskForDay" active-class="active">Задачи на день</b-nav-item>
            </b-navbar-nav>
        </b-navbar>
        <router-view></router-view>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question