Home signMedius sign
← Back to Stories

Using Angular Standalone Components

As a leading technology company working in boutique software development and artificial intelligence, Medius is committed to exploring and testing new and better solutions for our operations, as this is the best way to offer our partners the best possible solutions. At the same time, we want to give our team an environment in which the most advanced and innovative solutions can be developed.

One of the latest major innovations that have had a direct impact on our work is the new version of the Angular framework, or rather the new functionality it brings. We’re talking about Standalone Components, which can be viewed as Angular’s attempt at replacing ngModules, since ngModules are complex and problematic for less experienced developers.

As we believe that simplifying code and making it easier to understand is a step in the right direction, we have decided to implement this new feature in our processes.

Migrating to a newer version

The introduction of standalone components functionality aims to reduce complexity and increase code simplicity. While previously the project had to be set up from scratch by an experienced developer who had to immerse themselves in the complexity of the modules, the process is now much more developer-friendly, and also much quicker than the previous version. However, despite the many advantages, we will see below that in some cases there is still a need for ngModules.

Addressing challenges and constraints

When using standalone components, our developers encountered an obstacle related to the use of lazy loading, specifically for the lazy loading of JS chunks required to execute an application or a part of an application. Lazy loading is a technique in web platform development that optimizes the performance of web pages by loading content such as images, videos or even JS chunks only when they are needed. In practice, this means that the content is loaded on the page only when it appears in the user's field of vision through scrolling or navigation, which helps to initially load the page faster and consequently improves the user experience. In this case, the code is loaded on demand, with all the settings already predefined in the code, where we define when and which elements are loaded.

In the case of standalone components, however, we found that there is no mechanism to specify that the selected component is loaded later and is thus already included in the base code. Returning to the above example of loading a web page, this means that the web page may be slower, which in turn may have a negative impact on the quality of the user experience. This is why we have decided to revert back to using ngModules in certain cases, where the increased complexity means that we rely even more on the vast knowledge of our experienced developers.

Why Angular?

You may have wondered why Medius uses and advocates Angular, even though there are other solutions on the market.

We chose Angular based on a comparison and thorough research between the biggest three tools (Angular, React and Vue). Angular is a complete framework, and we like the fact that it is strictly typed, which, especially for business applications and complex back office applications, brings more stability and better understanding to both developers and end users. Potential errors can be addressed during development, as warnings are received on an ongoing basis, resulting in fewer errors and a better quality product.

Customer satisfaction is one of our key drivers when developing solutions, which is why Angular makes the most sense at the moment.

We use third-party cookies to analyze web traffic. This allows us to deliver and improve our web content. Our website uses cookies for these purposes only.