1

I have a nested route settings

let routes = [
{
    name: 'Admin',
    path: '/prod/:id',
    component: Admin,
    meta: {
        requiresAuth: true,
        title: 'Admin - Fraud tool'
    },
    children:[
        {
            path: 'users',
            component: Users
        }
    ]
}];

Then my url looks like this

http://localhost/prod/admin/users

How can I get the admin in this route in vue js?

1 Answer 1

5

Try this $route.params.id or $route.params which will give you object result

https://jsfiddle.net/yyx990803/L7hscd8h/

https://router.vuejs.org/guide/essentials/dynamic-matching.html

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.