Questions tagged [angular-lazyloading]

83 questions
1
vote
2 answers

loading additional scss files or code based on the chosen locale

I'm writing an angular 11 universal application with localization. what I'm trying to achieve is to be able to load more scss files based on the locale chosen. so for example if the user chose Hebrew it will add styles-he.scss that added…
ufk
  • 30,912
  • 70
  • 235
  • 386
1
vote
1 answer

Angular - Lazy load conditional route

I am building an application, where I authenticate the user at the start of the application. Based on the whether the user has been authenticated or not, I want to lazy load a different angular module. In context: app.component.ts @Component({ …
1
vote
4 answers

Facing issue while Lazy loading a module ( Cannot find module)

I am working on creating lazy loaded modules In spite of all my efforts, I think I am missing something here due to which I'm unable to load modules on demand. I have my project structure as below: app -users -homeComponent -signupComponent …
1
vote
0 answers

lazy loaded module(without router) throws compilation error

Following articles on medium, I am trying to load one portion of a dashboard as a module. The first step is to add this module in angular.json under "lazyModules" . As soon as i add this, i am getting this error - Module build failed (from…
Super Test
  • 25
  • 7
1
vote
1 answer

NgModuleFactoryLoader.load() is not able to find the module

Please refer my project structure here I have create a project with multiple lazy loaded nested modules. On the application start up AppModule is loaded When the user clicks on login button LoginModule is loaded If the user exists i.e if login is…
1
vote
1 answer

Angular lazy load module that only contains services?

I'm looking for a way to lazy load a module that doesn't contains any components but services only. The background: in my app is an Excel export service using exceljs library. This library is extremely large and I'm trying to prevent that the…
Lars
  • 920
  • 1
  • 14
  • 34
1
vote
0 answers

Getting "Cannot read property 'instant' of undefined" when using ngx-translate (TranslateService) whitin a service

I'm trying to translate via component, because I intend to use the translation in a sweetAlert pop up. I'm getting "Cannot read property 'instant' of undefined" though. I'd like to understand where I'm mistaken. Note: I'm using lazy load…
0
votes
0 answers

Bootstrap Modal is Not opening in Multiple Component

I having an CallToActionComponent which is having BS5 Modal and stored into Call Module. I want to access that CTA component into Home and Banner Component which is in Home Module. I have created ModelService and have function of openModal and…
0
votes
0 answers

ERROR Error: Uncaught (in promise): TypeError: Cannot read properties of undefined (reading 'ɵmod') in Angular

I'm trying to create a micro service frontend in angular Using this code for route : import { loadRemoteModule } from './federation-utils'; import { Routes } from '@angular/router'; import { APP_ROUTES } from '../app.routes'; import { Microfrontend…
user3653474
  • 3,393
  • 6
  • 49
  • 135
0
votes
0 answers

Angular architects module federation loads in the lazy loaded module dynamically but it is not visible on the page

I am using Angular 2 with module federation. I have 3 apps: Main (host) Child1 (remote) Child2 (remote) The structure is: Child1 and Child2 are exposed and Main is taking them as remotes. Child1 is injected to Main -> that is working fine. BUT my…
0
votes
1 answer

Not able to serve my angular app after upgrading from Angular 8 to 9

My angular project is currently running in Angular 8 and I use HeroDevs\Hero-Loader (https://www.npmjs.com/package/@herodevs/hero-loader/v/2.0.1) for lazy loading of modules for a page containing tabs. Tabs data are lazy loaded whenever user clicks…
GokuSS3
  • 123
  • 1
  • 11
0
votes
0 answers

Angular Routing issue: Route parameter redirects to incorrect path

I'm facing an issue with Angular routing where I'm trying to navigate to a specific route that includes a route parameter, but it redirects me to a different path instead. I have a ToursComponent that displays a list of tour cards, and when I click…
0
votes
0 answers

Angular Directive Type check for @Input property

I create a lazyLoad Directive to handle lazy load component. @Directive({ selector: '[lazyComponent]', }) export class LazyCompDirective> implements OnInit, OnDestroy { private _inputs: I|null = null; …
moussesj94
  • 485
  • 1
  • 8
  • 27
0
votes
0 answers

NG 13 update to NG 14/15: Throttling navigation to prevent the browser from hanging

Started this app 5 years ago with Angular 2, till Angular 13 the dynamic routes lazy loaded works fine (with canActivate DynamicPathGuard), after a upgrade/update to NG 14/15 the browsers keeps hanging in a infinite loop here! Can't see what I'm…
0
votes
1 answer

Angular 13 - Lazy load multiple components matching the same URL structure

I'm creating an Angular 13 app that has multiple components that can match the same URL although they would render different content (as in different components) based on the URL value. Thus I can have, like I do in Angular 9 same route paths…
Carlos Torrecillas
  • 4,965
  • 7
  • 38
  • 69