Thanks in advance for any help!
Greetings, I'm encountering the following error as described in the title. Despite my attempts at troubleshooting and research, I am unable to resolve it. Below are some important files - can anyone with experience in this issue provide assistance? The error occurs during 'ng serve' and 'ng build' commands, where 'ng serve' initially fails but automatically rebuilds and works fine. However, since the initial failure persists, I cannot successfully build it (which is the main issue).
ERROR in Could not resolve "patient.module" from "d:/Downloads/AngularApp/AngularApp/src/app/app.module.ts".
app.routing.ts
const patientRoutes: Routes = [
{
path: 'patient',
loadChildren: 'app/patient/patient.module.ts#PatientModule',
}
];
const nurseRoutes: Routes = [
{
path: 'nurse',
loadChildren: 'app/nurse/nurse.module.ts#NurseModule',
}
];
const appRoutes: Routes = [
{
path: '',
redirectTo: 'auth',
pathMatch: 'full'
},
{
path: 'auth',
component: AutenticationComponent
},
...patientRoutes,
...nurseRoutes
];
export const routing: ModuleWithProviders = RouterModule.forRoot(appRoutes, {useHash: true});
patient.module.ts
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { patientRouting } from './patient.routing';
import { PatientDashboardComponent } from './dashboard/patient-dashboard.component';
@NgModule({
imports: [
CommonModule,
patientRouting
],
declarations: [
PatientDashboardComponent
]
})
export class PatientModule { }
patient.routing.ts
import { ModuleWithProviders } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { PatientComponent } from './patient.component';
import { PatientDashboardComponent } from './dashboard/patient-dashboard.component';
import { PatientVideoComponent } from './video/video-chat.component';
const patientRoutes: Routes = [
{
path: 'patient',
component: PatientComponent,
children: [
{
path: '',
component: PatientVideoComponent,
children: [
{
path: '',
component: PatientDashboardComponent,
}
]
}
]
}
];
export const patientRouting: ModuleWithProviders = RouterModule.forChild(patientRoutes);
angularcli.json
"apps": [
{
"root": "src",
"outDir": "dist",
"assets": ["assets"],
"index": "index.html",
"main": "main.ts",
"test": "test.ts",
"tsconfig": "tsconfig.json",
"prefix": "app",
"mobile": false,