M
M
myskypesla2019-01-20 16:11:42
Vue.js
myskypesla, 2019-01-20 16:11:42

How to use one component for different pages?

Hello everyone
There are 2 pages, news and a news archive.
They look the same and accordingly I want to use one template, but just when the page is created, I will take the data, what kind of router it is and, depending on the router.name, make the appropriate request.
But the problem is that when you click on the menu to switch between the news router and the news archive router, only the page title changes, and the transition to the router with a new name does not occur physically, since the same component is used.
There is a solution?

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