AltitudeWeb/frontend/src/app/app.module.ts
Teriuihi c2c81de9d0 Convert components to standalone and implement route-based loading
Refactored Angular components to standalone modules, enhancing modularity and reducing dependency on `AppModule`. Updated routes to facilitate lazy loading for improved performance and maintainability. Replaced `platformBrowserDynamic` with `bootstrapApplication` for modern bootstrapping.
2025-04-08 21:45:44 +02:00

48 lines
1.7 KiB
TypeScript

import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {RouterModule, Routes} from '@angular/router';
import {HomeComponent} from './home/home.component';
import {NgOptimizedImage} from '@angular/common';
import {CookieService} from 'ngx-cookie-service';
import {MapComponent} from './map/map.component';
import {RulesComponent} from './rules/rules.component';
import {CopyIpComponent} from './copy-ip/copy-ip.component';
import {TermsComponent} from './terms/terms.component';
import {PrivacyComponent} from './privacy/privacy.component';
import {TeamComponent} from './team/team.component';
import {AboutComponent} from './about/about.component';
import {SocialsComponent} from './socials/socials.component';
import {VoteComponent} from './vote/vote.component';
import {BirthdaysComponent} from './birthdays/birthdays.component';
import {HttpClientModule} from '@angular/common/http';
const routes: Routes = [
{path: '', component: HomeComponent},
{path: 'map', component: MapComponent},
{path: 'rules', component: RulesComponent},
{path: 'vote', component: VoteComponent},
{path: 'about', component: AboutComponent},
{path: 'socials', component: SocialsComponent},
{path: 'team', component: TeamComponent},
{path: 'birthdays', component: BirthdaysComponent},
{path: 'terms', component: TermsComponent},
{path: 'privacy', component: PrivacyComponent},
];
@NgModule({
declarations: [],
imports: [
BrowserModule,
HttpClientModule,
RouterModule.forRoot(routes, {
scrollPositionRestoration: 'enabled',
}),
NgOptimizedImage,
CopyIpComponent,
],
providers: [CookieService]
})
export class AppModule {
}