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.
This commit is contained in:
@@ -1,13 +1,18 @@
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
import {Meta, Title} from '@angular/platform-browser';
|
||||
import {ALTITUDE_VERSION} from './constant';
|
||||
import {Router} from '@angular/router';
|
||||
import {Router, RouterOutlet} from '@angular/router';
|
||||
import {FooterComponent} from './footer/footer.component';
|
||||
|
||||
@Component({
|
||||
standalone: false,
|
||||
standalone: true,
|
||||
selector: 'app-root',
|
||||
templateUrl: './app.component.html',
|
||||
styleUrl: './app.component.scss',
|
||||
imports: [
|
||||
FooterComponent,
|
||||
RouterOutlet
|
||||
]
|
||||
})
|
||||
export class AppComponent implements OnInit {
|
||||
title = 'Survival Minecraft Server on ' + ALTITUDE_VERSION + '! | Altitude Community';
|
||||
|
||||
Reference in New Issue
Block a user