Lazy Loading Angular Applications

Lazy Loading Angular Applications

Lazy loading Angular applications. To lazy load Angular modules, use loadChildren (instead of component ). You might want to delay the loading of your Angular application. The key to delay the loading/execution of an Angular application is in the default entry point.

In very rare circumstances, you might want to delay the loading of your Angular application. In this article, I’ll show you how you can do it.

Warning: Don’t do this lightly. Carefully evaluate if you really need to do this, as it can have a devastating effect on user experience!

Angular module import side-effects

In my  previous article, I’ve briefly explained the Angular application bootstrap process. One thing that I mentioned there is that the import statements remain at runtime, and are taken care of by Webpack.

What I didn’t mention though is what happens as soon as Webpack imports an Angular module; for instance with the following line:

import { AppModule } from './app/app.module';

When you see this line, you might think that nothing much happens, apart for the AppModule to be loaded and available for use in the rest of the current module. Well actually there's a side-effect at play here!

programming angular javascript typescript

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

JavaScript Vs TypeScript

Get to know here difference between JavaScript & TypeScript, In this blog explained with pros and cons of TypeScript & JavaScript.

Install Angular - Angular Environment Setup Process

Install Angular in easy step by step process. Firstly Install Node.js & npm, then Install Angular CLI, Create workspace and Deploy your App.

What is TypeScript? Why TypeScript? and Why Not TypeScript?

TypeScript extends JavaScript by adding Types. There are many great reasons to switch to TypeScript. Especially if your team uses JavaScript. There are some reasons to not use TypeScript as there are with any language or framework.

Basics of Angular: Part-1

What is Angular? What it does? How we implement it in a project? So, here are some basics of angular to let you learn more about angular. Angular is a Typesc

TypeScript Tutorial For JavaScript Developers - TypeScript Basics

TypeScript Tutorial For JavaScript Developers - TypeScript Basics. I will show you guys 4 example of JavaScript code, and how to convert it to TypeScript. This is a typescript beginners tutorial.