Questions tagged lazy-loading

Explore the latest questions and answers asked by our top developers.

Need to lazy load Angular Material library in Angular 8 project

I want to use Angular Material’s Drag and Drop feature in my app. I don’t want to initially load it, but only when I use drag and drop feature in a specific component. I know how to lazy load modules in routes, but don’t know how to lazy load a library. Thanks. Source: New feed […]

By Mr A
Categorized as angular, angular-material, lazy-loading Tagged

Can’t bind to ‘lazyLoad’ since it isn’t a known property of ‘img’ – Ionic 4 – ng-lazy-load

I am trying to get lazyLoad to work on my Ionic 4 app. I have imported it on my app.module.ts, and are trying to use it on my page. I’m not sure what the issue is and any help is greatly appreciated. app.module.ts import { LazyLoadImageModule, intersectionObserverPreset } from ‘ng-lazyload-image’; @NgModule({ declarations: [AppComponent], entryComponents: [], […]

By glenskie16
Categorized as angular, ionic4, javascript, lazy-loading

Angular mat-tab lazy load and keep data between tabs

I am using Angular Material mat-tab and each tab has content of dynamic forms. I am trying to use lazy loading approach in order to avoid loading all the tabs content at the beginning and only load per tab to improve performance specially in Internet Explore. The problem i faced that it reloads the tab […]

By Mo Halem
Categorized as angular, angular-material, angular7, internet-explorer-11, lazy-loading Tagged

Angular 8 Routing a component between header and footer is not shown with no errors at the console

I am having a problem with angular routing. At the app.component.html we have: <router-outlet></router-outlet> And the app-routing.module.ts is like: import { NgModule } from ‘@angular/core’; import { Routes, RouterModule } from ‘@angular/router’; const routes: Routes = [ { path: ”, loadChildren: ‘./layout/layout.module#LayoutModule’ }, { path: ‘home’, loadChildren: ‘./layout/layout.module#LayoutModule’}, { path: ‘**’, redirectTo: ‘home’, pathMatch: ‘full’} […]

By alim1990
Categorized as angular, angular-routing, angular8, lazy-loading

Cannot load sibling route component in lazy load module

I cannot seem to load a sibling route from a lazy loaded feature. The first component loads – PlayListsComponent. But I cannot navigate from there to the sibling route – playlist/:id. I believe it has something to do with the ‘path’. I tried using the relative path option when calling navigate from the already loaded […]

By godhar
Categorized as angular, angular-ui-router, lazy-loading, lazyload

Browser get freezed after loading huge data in angularjs (2k rows)

I am fetching data from server its loading time is quite good, But while rendering all data almost 3k rows to view (angularJs) browser get freeze and after some time its crashed also. I tried pagination but after crossing 500 rows its start freezing. Some time its load all data into view but while scrolling […]

Error while implenting lazy-loading in angular 8: : ASSERTION ERROR: NgModule ‘MyReportsGridComponent’ is not a subtype of ‘NgModuleType’

I read some articles can’t seem to implement lazy-loading my application. I have angular 8 installed and it seems I have the right syntax. Is there a specific strategy or way I need to have my components organized to get lazy loading to work? This is the error message: core.js:7187 ERROR Error: Uncaught (in promise): […]

By elquesogrand
Categorized as lazy-loading Tagged ,

AngularJS improve first loading of landing page, deffer loading of other scripts

My angular app uses quite a lot of modules wich are all needed to be included before my app.js file (where the main app lies) and am using ui-view, due to that the first load takes quite some time because it has to wait for all the dependent modules to load first, before loading the […]

By Xsmael
Categorized as javascript, lazy-loading, optimization Tagged

Routing error in lazy loading after upgrading to Angular 8

I have upgraded to Angular 8 and found the in lazy loading modules routing. While upgrading CLI itself changed all my lazy loading routes according to new syntax. ERROR in ./src/app/app.routing.ts 31:36 Module parse failed: Unexpected token (31:36) You may need an appropriate loader to handle this file type. | title: “abc” | }, loadChildren: […]

By Ashish Sharma
Categorized as javascript, lazy-loading, routing Tagged ,

Lazy load routes in Angularjs with $ocLazyLoad

I’m using Angular-ui-router for routing and oclazyload to load each controllers base on routes (lazy loading). Problem: My route.js file is getting bigger and bigger (8000 line until now!) I lazy load my routes like controllers as below. // app.config(routes.js) ↓ $stateProvider .state(‘app.warehouses’, { url: ‘/warehouses’, views: { “[email protected]”: { templateUrl: ‘warehouses/warehouses.html’, controller: ‘warehousesCtrl’ }, […]

1 18 19 20 21

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us