What's new in Angular 12?

What's new in Angular 12?

The Angular 12 update is ready for production use. You can view it on GitHub. Before you start upgrading make sure to read the Updating to Angular 12 docs because there are numerous breaking changes and deprecations. We recently covered the changes made in Angular 11 and now we’re going to discuss the changes made in Angular 12.

The most important change is moving libraries to IVY. The primary focus of IVY is to improve build times, improve readability of code for debugging, and improve performance of applications by making them smaller.

IVY will be mandatory in Angular 13 so make sure to get working on migrating your libraries immediately. You can find info on how to accomplish that here.

Here’s a list of other major changes:

  • Default Code Completion and Hints included in templates.
  • Tools to migrate legacy IDs to newest IDs using more advanced algorithms
  • Custom routing Implementations
  • More Responsive Forms
  • CLI Automated Migration Guide available
  • Discontinued support of Internet Explorer 11
  • SASS imports use a new API with @use command. Just use command ng g @angular/material:themingApi to migrate them.
  • Webpack 5 ready for production.
  • Numerous breaking changes.

Lets look at each.

Default Code Completion and Hints in Templates

Basically when you are writing the code, it will work like predictive text does in your text messages. If you input something that is incorrect, it will notify you and give suggestions of possible features. This is great for speeding up the time of coding. Every keystroke is extra time so the more keystrokes you save the more features you can add.

Migrating Legacy IDs to newest IDs

This is most important if you haven’t updated to Angular 11 already. Angular 12 uses the same IDs as Angular 11, but makes it easier to work with them. It gives both a CLI path to migration or a localize-extract script to migrate you can find information about how to use each on Angular’s page.

Custom Routing

Custom routing is used when dependencies impact what the software user will see next. For instance, when you are going to a bank, you may want to deposit, view balance, or withdraw money from an ATM. This change makes for more seamless changes to an application. Instead of going to a whole new page, more information will be shown on the same page based on which option you touch.

More Responsive Forms

There were improvements to responsive forms that allow for better verification of things like names and values. This can prevent users from having to submit to find out there is a problem with some of the information they input into a form. For instance if an email is needed and it doesn’t meet the *******@******.com requirements is will notify them that it needs to be fixed. The ability for both standard and custom uses are available. Check out Angular’s Form Validation for more info.

CLI Automated Migration Guide Available

Command-Line Interface is what the programming is completed with. By running a simple code it will update to the most recent version of Angular, but because of breaking changes you may not want to do it before checking that everything is ready for the changes.

Angular provides a guide of what to do before and after running the upgrade command. This can be used before upgrading to any version of angular. It specifically discourages from doing major jumps from 5-7, but gives you a list of steps should you decide you are going to anyways.

Discontinued Support of Internet Explorer 11

Microsoft isn’t continuing to support IE 11 so Angular has discontinued allowing it as well. Make sure you aren’t using it or your applications won’t work. If your clients or customers are using it, make sure there is something that displays “IE 11 is not supported. Please update your browser to a supported browser.”

SASS API

The underlying SASS API has changed and with that changes for how it interacts with Angular. One of the main ones is the move from import to Use and this can be automatically updated following the upgrade guide.

The SASS API brings a number of changes but one of the main ones is closer interaction with Material Angular.

WebPack 5

We discussed it regarding 11. Now it’s ready for a production environment.

Webpack 5 identifies unused code in the application (previously available feature) and modules (new feature) to help reduce the size of applications more than previous Angular releases. With more persistent caching and better long-term caching options the speed is increased further. There are also advancements for developers in the webpack.

Breaking Changes

Anytime new software comes out there are breaking changes. The most noticeable ones in Angular 12 are the requirement for TypeScript 4.2.3 or higher and WebPack 5. For a full list go to Angular .

If you need help updating your source code, we provide Source Code Upgrades and have been updating clients software regularly so we are familiar with the changes. Let us know how we can help.

 

Trent Gardner

Chief Executive Officer at G.J. Gardner Homes

3 年

Great video Matt!

回复

要查看或添加评论,请登录

Mathew Grace的更多文章

  • Leadership & Career Progression: Actionable Tips to Follow

    Leadership & Career Progression: Actionable Tips to Follow

    What do you think are the hallmarks of great leadership? In this article, I’m sharing my thoughts on the most important…

    4 条评论
  • No Code/Low Code: Did It Miss the Mark?

    No Code/Low Code: Did It Miss the Mark?

    Did the no code/low code campaign miss or hit the mark? Here’s what I think: it hit a different area from what it was…

    3 条评论
  • Start With The Customer Experience

    Start With The Customer Experience

    I’ve produced nearly 100 videos on Flying Donkey’s YouTube channel. And I’ve never featured any popular videos from…

    1 条评论
  • Insolvencies and The Growth-at-All-Costs Mindset

    Insolvencies and The Growth-at-All-Costs Mindset

    It’s been a tough period for technology companies since there’s been a shift from a growth-at-all-cost mindset to a…

    2 条评论
  • Remote, Hybrid or In-Office: What Works for SaaS Teams?

    Remote, Hybrid or In-Office: What Works for SaaS Teams?

    Prior to the COVID-19 pandemic, almost all software development companies worked in offices. Some tinkered with the…

    2 条评论
  • Product/Market Fit: What Does It Mean?

    Product/Market Fit: What Does It Mean?

    I’ve talked to a lot of companies trying to launch their product, and they’ve all told me they have the so-called…

  • Does the Best SaaS Product Always Win?

    Does the Best SaaS Product Always Win?

    Does the best product always win? That’s a tough question to answer, but in my experience, the best product doesn’t…

    3 条评论
  • Using Templates in Your SaaS Products

    Using Templates in Your SaaS Products

    Are you using templates in your business? If not, you should — they offer truly surprising benefits in terms of product…

    1 条评论
  • The Medibank Hack Scenario

    The Medibank Hack Scenario

    We can learn plenty of lessons from various hacking scenarios around the world. In this article, I want to focus on the…

  • Creating a Crypto Coin: The Fluffy Coin Experiment

    Creating a Crypto Coin: The Fluffy Coin Experiment

    Today, I want to talk about crypto — specifically, launching crypto coins, what’s involved in the process, and what…

    1 条评论

社区洞察

其他会员也浏览了