I
I
Igor2019-08-26 03:11:39
Vue.js
Igor, 2019-08-26 03:11:39

How to change title in nuxt ssr?

Colleagues, hello!
How to change $route.meta.title from component?
layouts/default.vue

...
<div class="breadcrumb">
        <div>
          <Breadcrumbs :items="$route.meta.breadcrumbs"/>
        </div>
        <div>
          <h1>{{ $route.meta.title || '' }}</h1>
        </div>
      </div>
...

ssr included.
In fact, the titles are already set, but I need to change one of them while the application is running, on one of the pages.
Doesn't change directly.
How to achieve this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2019-08-26
@Sponom

You can change the title inside any child component.
Look in the documentation, maybe you will find something useful
https://nuxtjs.org/api/pages-head

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question