Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

Can't get basic children route to work

$
0
0

Hi,

I am a complete beginner in Ionic

I’m watching the “Getting Started with Ionic Vue” video and I can’t reproduce the routing thing with a children (23:20 - 25:25).

here is my /router/index.ts:

import { createRouter, createWebHistory } from '@ionic/vue-router';
import { RouteRecordRaw } from 'vue-router';
import TabsPage from '../views/TabsPage.vue'


const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    redirect: '/tabs/dressings'
  },
  {
    path: '/tabs/',
    component: TabsPage,
    children: [
      {
        path: '',
        redirect: '/tabs/dressings'
      },
      {
        path: 'dressings',
        component: () => import('@/views/DressingPage.vue'),
        children:[
          {
            path: 'create',
            name: 'create',
            component: () => import('@/views/AddDressing.vue'),
          },

        ]
      },
      {
        path: 'tenues',
        component: () => import('@/views/TenuesPage.vue'),
      },
      {
        path: 'conseils',
        component: () => import('@/views/ConseilsPage.vue'),
      },
      {
        path: 'profil',
        component: () => import('@/views/ProfilPage.vue'),
      }
    ]
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router

I can access to http://localhost:8100/tabs/dressings/ and http://localhost:8100/tabs/create but I can’t access to http://localhost:8100/tabs/dressings/create

What am I missing ?

Thanks for your help

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>