import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { HomeComponent } from './features/home/home.component'; import { SearchPageComponent } from './features/discover/search-page/search-page.component'; import { TrendingComponent } from './features/discover/trending/trending.component'; import { PopularComponent } from './features/discover/popular/popular.component'; import { FavoritComponent } from './features/library/favorit-page/favorit.component'; import { WatchlistComponent } from './features/library/watchlist-page/watchlist.component'; const routes: Routes = [ { path: '', redirectTo: '/home', pathMatch: 'full' }, { path: 'home', component: HomeComponent }, { path: 'search', component: SearchPageComponent }, { path: 'popular', component: PopularComponent }, { path: 'trending', component: TrendingComponent }, { path: 'discover', loadChildren: () => import('./features/discover/discover.module').then( (m) => m.DiscoverModule ), }, { path: 'library', loadChildren: () => import('./features/library/library.module').then((m) => m.LibraryModule), }, { path: 'media', loadChildren: () => import('./features/media/media.module').then((m) => m.MediaModule), }, { path: 'calendar', loadChildren: () => import('./features/calendar/calendar.module').then((m) => m.CalendarModule), }, { path: 'favorit', component: FavoritComponent }, { path: 'watchlist', component: WatchlistComponent }, { path: 'settings', loadChildren: () => import('./features/settings/settings.module').then( (m) => m.SettingsModule ), }, { path: 'entries', loadChildren: () => import('./features/entry/entries.module').then((m) => m.EntriesModule), }, { path: 'collections', loadChildren: () => import('./features/collections/collections.module').then( (m) => m.CollectionsModule ), }, ]; @NgModule({ imports: [RouterModule.forRoot(routes)], exports: [RouterModule], }) export class AppRoutingModule {}