I have encountered a strange bug - Whenever I close and reopen my project in Webstorm IDE and then launch the project, I receive a "cannot get" error. This issue is resolved if I delete the route {path: '', component: AppComponent}, and then the application works correctly. However, when I save, close, and reopen the project again, the same error reappears. But this time, if I add back the previously deleted route {path: '', component: AppComponent} to the routes, the project functions without any errors. It seems like I am caught in a cycle where I need to constantly adjust the routes every time I open my project. Any assistance would be greatly appreciated.
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import {NavbarComponent} from './Navbar/Navbar.component';
import { ArraysComponentComponent } from './arrays-component/arrays-component.component';
import {FormsModule} from '@angular/forms';
import { StackComponent } from './stack/stack.component';
import {RouterModule, Routes} from '@angular/router';
import { QueueComponent } from './queue/queue.component';
import { CircularQueueComponent } from './circular-queue/circular-queue.component';
import { CarouselComponent } from './carousel/carousel.component';
import { LinkedListComponent } from './linked-list/linked-list.component';
import { HomeContentsComponent } from './home-contents/home-contents.component';
import { BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {ParticlesModule} from 'angular-particle';
import '@angular/compiler';
import { BackgroundComponent } from './background/background.component';
import { SignInComponent } from './sign-in/sign-in.component';
import {AngularFireModule} from '@angular/fire';
import {FirebaseService} from './services/firebase.service';
import { BubbleSortComponent } from './SortingTechniques/bubble-sort/bubble-sort.component';
import { InsertionSortComponent } from './SortingTechniques/insertion-sort/insertion-sort.component';
const appRoutes: Routes = [
// {path: '', component: AppComponent},
{path: 'arrays', component: ArraysComponentComponent},
{path: 'stack', component: StackComponent },
{path: 'queue', component: QueueComponent },
{path: 'bubbleSort', component: BubbleSortComponent},
{path: 'insertionSort', component: InsertionSortComponent},
{path: 'll', component: LinkedListComponent },
];
@NgModule({
declarations: [
AppComponent,
NavbarComponent,
ArraysComponentComponent,
StackComponent,
QueueComponent,
CircularQueueComponent,
CarouselComponent,
LinkedListComponent,
HomeContentsComponent,
BackgroundComponent,
SignInComponent,
BubbleSortComponent,
InsertionSortComponent
],
imports: [
ParticlesModule,
BrowserModule,
FormsModule,
BrowserAnimationsModule,
RouterModule.forRoot(appRoutes),
AngularFireModule.initializeApp({
apiKey: 'AIzaSyAcFmdpNWPHs22gRXwoLlO8QQdcPkKwQtM',
authDomain: 'dsalgo-210c7.firebaseapp.com',
projectId: 'dsalgo-210c7',
storageBucket: 'dsalgo-210c7.appspot.com',
messagingSenderId: '904101204684',
appId: '1:904101204684:web:d001f5647d004f0140e869',
measurementId: 'G-962JE081HH'
}),
],
providers: [FirebaseService],
bootstrap: [AppComponent]
})
export class AppModule { }