This year Angular released three major versions: The late release of v9 was followed by a fast v10. Now Angular 11 is here. What has happened to this version, which exciting new features should you know? Angular expert Manfred Steyer explains this in an interview.
Developer: Angular 10 was smaller than most major versions. Has that changed back to v11?
Manfred Steyer: I would say version 11 is another rounding off. The development at Angular is really very evolutionary – exactly what you need in the enterprise environment, where Angular is strong: No major changes, but a small bundle of new features every 6 months.
Developer: What do you think is the most interesting new feature in Angular 11?
Steyer: The most important innovation for me and many of my customers is that the Angular CLI now supports webpack 5 – at least that’s an experimental feature. Webpack 5 is important because with Module Federation it offers a very solid and innovative solution for the implementation of micro frontends. To do this, we had to use many tricks and workarounds in the past. Fortunately, we don’t need them anymore.
Developer: The CLI still comes with webpack 4 as standard, right?
Steyer: Exactly. Webpack 5 is an opt-in. You have to make an entry in the package.json. The reason is that the CLI has been extensively tested with webpack 4 and webpack 5 is very new on the one hand and brings some changes with it on the other. The webpack 5 integration is already working quite well, but is officially still experimental. On GitHub you can find an overview of the things that are still causing problems. Especially when you start a long-term project today – and micro-frontend solutions fall into this category – you can come to terms with it.
Basic camp for beginners
Get a structured and comprehensible introduction to Angular. All concepts and backgrounds easily explained online!
New: Deep-Dive for advanced users
Penetrate all of Angular’s concepts. Learn about pitfalls, misunderstandings, and deliberate limitations. As online training or on-site in Düsseldorf!
Developer: In the course of the development of Angular 11, the changelog repeatedly showed that certain changes were marked as breaking changes. How will it be with the update? Do developers have to prepare for difficulties here?
Steyer: From my point of view, there are three main reasons for this: Elements have been removed that were marked as deprecated in earlier versions. This officially falls under “Breaking Change”. In addition, some bugs have been fixed and asymmetries have been corrected. For some breaking changes, improvements with regard to a stricter typification are probably responsible. The new strict mode is very important to the Angular team. This mode offered by the CLI enables some strict type checking in TypeScript that has been added over time. It also enables more stringent checks in the Angular Compiler and defines smaller performance budgets.
Of course, these stricter checks have problems with those places in Angular where you can find a rather “tolerant typing” up to now. And that’s exactly why we had to make improvements here. Technically this is a breaking change, but many will not even notice it. Especially not if you have used the respective building blocks “in the spirit of the inventor” and not misused them.
There are also migration scripts that are triggered by ng update. In many cases, as with previous versions, they pull the program code straight so that you don’t have to worry about it manually.
Developer: And finally: What do you wish for the future of Angular?
Steyer : I’m already looking forward to the day when Angular modules will be optional. They were never really planned, especially since TypeScript or ECMAScript already has its own module system. This duplication always causes misunderstandings and is annoying. It also increases the learning curve for beginners.
Thank you for the interview!