-
Notifications
You must be signed in to change notification settings - Fork 654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New routes resulting in 404 #64
Comments
@paragonsoftwaresolutions Have you added |
Yes, it is there. I can access Catalog page, but I can not access the create or edit page. |
I think this should be |
I have tried it that way. Same results. I can't access the create page either. |
I figured out what I was doing wrong. I removed products/ from my edit route and now it works. I'm assuming since the parent route path was '/products' having that on my child route meant I was trying to access '/products/products/edit' which doesn't exist. |
@paragonsoftwaresolutions Thanks for letting me know. I'm sorry because I couldn't help you. |
I am trying to implement a "Create" and "Edit" button that will open the desired page. I set the routes up the same as it is done in the admin routes file for articles/create and articles/edit. However, when I click on the button I get a 404 response. I am not seeing a route set up for articles/create yet it still works. Am I missing something here?
Here is my router module:
`import Layout from '@/layout';
const productsRoutes = {
path: '/products',
component: Layout,
redirect: '/products/catalog',
name: 'Products',
alwaysShow: true,
meta: {
title: 'Products',
icon: 'shopping',
permissions: ['view menu products'],
},
children: [
{
path: 'catalog',
component: () => import('@/views/products/List'),
name: 'Catalog',
meta: { title: 'Catalog', icon: 'list', noCache: true },
},
{
path: 'products/create',
component: () => import('@/views/products/Create'),
name: 'CreateProduct',
meta: { title: 'createProduct', icon: 'edit', permissions: ['manage products'] },
hidden: true,
},
{
path: 'products/edit/:id(\d+)',
component: () => import('@/views/products/Edit'),
name: 'EditProduct',
meta: { title: 'editProduct', noCache: true, permissions: ['manage products'] },
hidden: true,
},
],
};
export default productsRoutes;`
Here is the code for the button to open the page:
<router-link :to="'/products/edit/'+row.id"> <el-button type="primary" size="small" icon="el-icon-edit" v-permission="['manage products']"> Edit </el-button> </router-link>
The text was updated successfully, but these errors were encountered: