Answer the question
In order to leave comments, you need to log in
How to create your own page url?
Good afternoon, tell me how you can create your page address. That is, the user enters his url address in the input field (for example: domain.com/what the user entered) and this will be a unique page with his address
Answer the question
In order to leave comments, you need to log in
Within the same domain - the relative url of the page is just an identifier that is stored in the database on the backend, and then based on this identifier and the data associated with the user, the page is generated on the backend.
For any domain, such a task is not feasible.
Do you know about Vue Router?) Is it not suitable for this task for some reason?
const rotues = [
{
// :user_input = "то что ввел пользователь"
path: '/:user_input',
name: 'UserPage',
component: UserPage
}
]
created() {
const user_input = this.$route.params.user_input
this.$api.getUser(user_input)
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question