A
A
Artem00712017-04-15 14:53:44
Vue.js
Artem0071, 2017-04-15 14:53:44

How can I prevent the parent component from reloading?

I have the following component structure in a simplified form:

<div class='main'>
    <router-view>
        <div class='child'>
            <router-view>

In the route I wrote this:
path: '/profile/:alias',
      component: Profile,
      children : [
        {path: '', component: mainProfile},
        {path: 'posts', component: postsProfile}
      ],

when I follow links, let's say from /profile/example to /profile/example/posts , the parent component is also reloaded. Can this be avoided somehow?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lem_prod, 2017-04-15
@lem_prod

here, I think you will figure it out https://ru.vuejs.org/v2/guide/conditional.html#Control...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question