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

Add side menu with tabs base app not work - ionic 4

$
0
0

@ebeliejinfren wrote:

i use ionic 4 tabs base and added sidemenu to app.component.html and it’s work
but i want side menu as a page not in app.component.html

i use angular base router.
app has 3 tabs -> Home - Search - Profile
Home has a child -> Songs
Songs has details page -> Details

How i Can Add sidemenu oage without broken ?

app-routing.module.ts

const routes: Routes = [
  { path: '',
   loadChildren: './pages/tabs/tabs.module#TabsPageModule',
   canActivate: [IntroGuard]
   },
  { path: 'intro', loadChildren: './pages/intro/intro.module#IntroPageModule' }
];

tabs.module.ts

 const routes: Routes = [
      {
        path: 'main',
        component: TabsPage,
    
        children: [
            {
                path: '',
                loadChildren: '../menu/menu.module#MenuPageModule'
            },
            {
                path: 'home',
                resolve: {
                    myVariant: ResolverService
                },
                children: [
                    {
                        path: '',
                        loadChildren: '../home/home.module#HomePageModule'
                    },
                    {
                        path: 'songs',
                        resolve: {
                            myVariant: ResolverService
                        },
                        loadChildren: '../songs/songs.module#SongsPageModule'
                    },
                    {
                        path: 'songs/:id',
                        resolve: {
                            myVariant: ResolverService
                        },
                      loadChildren:'../details/details.module#DetailsPageModule'
                    },
     ]
            },
            {
                path: 'search',
                loadChildren: '../search/search.module#SearchPageModule'
            },
            {
                path: 'profile',
                children: [
                    {
                        path: '',
                        loadChildren: '../profile/profile.module#ProfilePageModule'
                    },
                    {
                        path: 'songlist',
                        loadChildren: '../songlist/songlist.module#SonglistPageModule'
                    }]}
]

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70434

Trending Articles



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