Answers for "angular lazy loading"

1

creating a module with lazy loading in angular 9

ng g m customers --route customers --module app.module
Posted by: Guest on May-16-2021
1

ng lazy load

content_copy
      
      ng generate module customers --route customers --module app.module
Posted by: Guest on July-20-2021
0

how to lazyload angular

import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

const routes: Routes = [
  {
    path: 'dashboard',
    loadChildren: () => import('./modules/dashboard/dashboard.module').then(m => m.DashboardModule)
  },
  {
    path: 'projects',
    loadChildren: () => import('./modules/projects/projects.module').then(m => m.ProjectsModule)
  },
  { path: '', pathMatch: 'full', redirectTo: 'dashboard' },
];

@NgModule({
  imports: [RouterModule.forRoot(routes, { useHash: true })],
  exports: [RouterModule]
})
export class AppRoutingModule { }
Posted by: Guest on November-20-2020
0

angular lazy loading

content_copy
      
      const routes: Routes = [
  {
    path: 'customers',
    loadChildren: () => import('./customers/customers.module').then(m => m.CustomersModule)
  },
  {
    path: 'orders',
    loadChildren: () => import('./orders/orders.module').then(m => m.OrdersModule)
  },
  {
    path: '',
    redirectTo: '',
    pathMatch: 'full'
  }
];
Posted by: Guest on April-24-2021
1

angular lazy loading images

npm install ng-lazyload-image --save
Posted by: Guest on July-13-2020

Browse Popular Code Answers by Language