dip s

dip s

  • NA
  • 256
  • 82.5k

Error: Loading chunk 5 failed on MAC device

Oct 22 2019 1:00 AM
Hello all,
 
We have a cloud based application in angular 6 and asp.net MVC 5
 
Our application works fine on android, Chrome.
 
It does not work on MAC.
 
So, we install chrome on apple ipad and try to run our application. Login is successful and dashboard is getting displayed but when i am trying to open another page(e.g. Appointment) it shows error as "Error: loading chunk 5 failed"
 
Please help. Any help would be appreciated. Thank you
 
Code of app-routing.module.ts :
  1. import { NgModule } from '@angular/core';  
  2. import { Routes, RouterModule } from '@angular/router';  
  3. const routes: Routes = [  
  4. { path: '', loadChildren: () => import('./login/login.module').then(m => m.LoginModule) },  
  5. ];  
  6. @NgModule({  
  7. imports: [RouterModule.forRoot(routes)],  
  8. exports: [RouterModule]  
  9. })  
  10. export class AppRoutingModule { }  
Code of layout-routing.module.ts :
  1. import { NgModule } from '@angular/core';  
  2. import { Routes, RouterModule } from '@angular/router';  
  3. import { LayoutComponent } from './layout.component';  
  4.   
  5. const routes: Routes = [  
  6. {  
  7. path: '',  
  8. component: LayoutComponent,  
  9. children: [  
  10. { path: 'dashboard', loadChildren: () => import('./dashboard/dashboard.module').then(m => m.DashboardModule) },  
  11. { path: 'appointment', loadChildren: () =>  
  12. import('./TransactionComponent/appointment/appointment.module').then(m => m.AppointmentModule)}  
  13. ];  
  14.   
  15. @NgModule({  
  16. imports: [RouterModule.forChild(routes)],  
  17. exports: [RouterModule]  
  18. })  
  19. export class LayoutRoutingModule { }  
code of appointment.module.ts
  1. import { NgModule } from '@angular/core';  
  2. import { CommonModule } from '@angular/common';  
  3. import { AppointmentComponent } from './appointment.component';  
  4. import { AppointmentRoutingModule } from './appointment-routing.module';  
  5. @NgModule({  
  6. declarations: [AppointmentComponent],  
  7. imports: [  
  8. CommonModule,  
  9. AppointmentRoutingModule,  
  10. PageHeaderModule,  
  11. NgbModule  
  12. ],  
  13. providers: [AppointmentService]  
  14. })  
  15. export class AppointmentModule { }
For apple devices routing is not working properly. Please help.
 
Thank you.