Paul Krill
Editor at Large

Angular 14 to add strictly typed reactive forms

news
Feb 9, 20222 mins

Plans for the next major release of the Google-developed web framework also include standalone components, while NgModules would become optional.

cia triad security triangle glowing binary process by nolimit46 getty 2400x1600
Credit: nolimit46 / Getty Images

Angular 14, the next major upgrade to the popular Google-developed, TypeScript-based web framework, will feature strictly typed reactive forms and extended template diagnostics. Due in June, the release will also make NgModules optional.

The most-requested improvement for the framework on GitHub, strictly typed reactive forms is intended to improve the developer experience of Angular’s model-driven approach to handling form inputs whose values change over time. Plans call for providing as much type safety as possible while balancing against API complexity; supporting gradual typing and allowing typed and untyped forms to be mixed; landing changes without breaking existing applications; and avoiding the fragmentation of the ecosystem. The intention is to not change template-driven forms.

Extended template diagnostics in the compiler would guard developers from hitting common errors. These diagnostics would be applied after type checking. At present, the compiler lacks warnings and generally only fails on fatal issues that directly prevent compilation. Extended diagnostics will allow warnings to be easily authored to check for smaller mistakes, such as getting two-way binding syntax backwards or having extraneous operators, like using foo ?? ‘bar’ when foo is not nullable. A new private flag in the compiler would enable diagnostic checks that giving warning/information diagnostics about user templates that are not strictly fatal errors.

Angular 14 also is set to move forward with the adoption of standalone components and make NgModules optional. The plan calls for moving Angular in a direction where pipes, directives, and components play a more central role and are self-contained.

Angular 14 is available in pre-release form on GitHub. While the feature set for Angular 14 still is subject to change, other capabilities currently planned for the release include tree-shakable error messages and TypeScript 4.7 support. Predecessor TypeScript 4.6 is due as a production release later this month; TypeScript 4.7 support is a project based on Angular’s release schedule.

Angular 13 was published in November.  

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author