Questions tagged [angular-lazyloading]
83 questions
2
votes
2 answers
When and How to use Guards in Lazy Loading routes with Angular TS
I am trying to build an application using Angular 9 and in my
app-routing.module.ts
const routes: Routes = [
{
path: '', canActivate:[GuestGuard], component: BlankComponent, children:[
{path:'', loadChildren: () =>…

Alaksandar Jesus Gene
- 6,523
- 12
- 52
- 83
2
votes
1 answer
Delete NgRx node by LazyLoading
I'm working in and angular 9 app implementing NgRx with lazy load
when the app loads, my state looks like this
and when I navigate to the route '/account-config' the state change becouse I have lazy loaded the module and implemented a…

Sergio Mendez
- 1,311
- 8
- 33
- 56
1
vote
1 answer
Angular - Why Lazy Load return an empty path?
I am having an issues with the Lazy Loading. I can navigate between the pages, to paths are correct, but the lazy loaded pages are empty: http://localhost:4200/contact and http://localhost:4200/tours
The project is super simple, I basically just…

PLee
- 23
- 4
1
vote
0 answers
Angular lazy loading of components in dynamic routes
Problem
I have an Content Management System Angular application where all components are present in main component. Routes are created dynamically for this components (at runtime).
E.g. a page is created with name A, then dynamically a route can be…

Christy Golmez
- 11
- 2
1
vote
1 answer
Can't bind 'ngIf' it isn't a known property of 'button'
I am trying to open the component in MatDialog in angular 13 & ionic 6. Here is the sample code of how I open the component in MatDialog.
Here my app.module.ts file
import { NgModule } from '@angular/core';
import { BrowserModule } from…

Sharann Nagarajan
- 29
- 2
1
vote
2 answers
Using single component from library causes lazy-loaded modules to end up in main bundle
I've created a Bootstrap component library for angular along with a demo application. However when building the application, the main bundle size is massive. More remarkably, adding components to the library, and adding pages (lazy-loaded) to the…

Pieterjan
- 2,738
- 4
- 28
- 55
1
vote
1 answer
How to compile the dynamic modules using AOT Compiler in Angular 8
I am using Angular 8 with AOT compiler. I need to compile the modules dynamically when I click the button.
In that module file, the component is declared.
Testingmodule.ts
import { NgModule } from '@angular/core';
import { CommonModule } from…

Vijayalashmy
- 36
- 4
1
vote
0 answers
lazy loading with CanActive
I implemented lazy loading in my project and it works well: the components load only if the http route is requested.
but when I implement canActive to prevent some users from accessing: the user can no longer access but Lazy loading still loads…

tshishi
- 11
- 2
1
vote
0 answers
How to get the scroll position when navigating from one page to another, using lazy loading in angular 12
I have the list page. when i scroll down and click on one of the entry, it redirects to the detail page which opens up from the top. Now when i go back to the list page it should open up at the same scroll position as it was when i click on one of…

purvaDevIt
- 11
- 1
1
vote
0 answers
How to share components through lazy loaded module and app.module.ts?
The whole replication of my problem you can find on…

someusername12
- 45
- 6
1
vote
1 answer
I want to lazy load my third party libraries?
I am trying to lazy load the third-party libraries but I couldn't find any solution if anyone have any idea please share.

Balaji D
- 11
- 2
1
vote
2 answers
Trying to lazy load custom themes dynamically based on angular material
I'm writing an angular 12 website with angular material.
This project supports several domains and on different domains it supposed to show different theme.
so what I'm trying to resolve here is to be able to load themes dynamically with lazy…

ufk
- 30,912
- 70
- 235
- 386
1
vote
1 answer
Angular Material with Lazy Loading Module
i already found that which looks similar but does not help me. Lazy loading Angular modules with latest Angular material design gives error
My problem is, that i have lazy loading modules. app-routing.module.ts
const routes: Routes = [
{path: '',…

IEE1394
- 1,181
- 13
- 33
1
vote
1 answer
Import an external bundle JS file is not woking on Angular Lazy loading
I'm working on an Angular project. I got a HTML template with bundle css and js files.
Firstly, I put them inside angular.json and did a normal routing (route every components directly from the app.routing.ts). This method worked perfectly. The…

Hikaru Shindo
- 2,611
- 8
- 34
- 59
1
vote
0 answers
Angular routing lazy loading not working for bookmarked routes
I use lazy loading modules with routing for first level naviagtion. One module for each first level nagigation element. This works fine.
I load the child navigation (second level) items dynamically using lazyloading. In principal routing works but…

Niki
- 13
- 5