New Features in Angular 14

This blog is to discuss major new features of Angular 14.

Angular 14, the latest version of the Google-developed, TypeScript-based web application framework, has arrived, featuring typed forms and a developer preview of standalone components.

To upgrade  from Angular 13 to Angular 14 use the below upgrade command .

ng update @angular/core@14 @angular/cli@14

Standalone  Components in Angular 14 

For standalone components,  there is no  need to mention the component name in the declaration section of app.modules .ts file. The component name can be mentioned in the imports section.  In Angular 14  we can create  standalone directives and pipes.

In the root folder of the application  execute the below command  to create the standalone component

ng  g c login –standalone

The above command will  create the standalone component. A login component will be auto-generated.

Add loginComponent in the import section of appmodule.ts. There is no need to add it to the declaration section.  If  you want to add loginComponent while bootstrapping the application, you can add it in main.ts file.

Reactive Forms:

Typed forms ensure that the values we enter in the form of controls, groups, and arrays are type-safe across the entire API surface.

Route Title

The developer can set title of the route  in-app-routing, module.ts file

when the user has visited the login route, the title of route is displayed in the browser tab.

Conclusion

With the release of Angular 14, Google has provided lot of new features which are developer  friendly and improve the performance of the application.

 

 

 

 

Author Details

Laxman Thota

I am Laxman Thota working as Technology Lead in from last 10 years. I am keen on learning new technologies

Leave a Comment

Your email address will not be published. Required fields are marked *