Introduction to Angular 5

AngularJS  is a JavaScript-based open-source front-end web application framework mainly maintained by Google and by a community of individuals and corporations to address many of the challenges encountered in developing single-page applications. The JavaScript components complement Apache Cordova, a framework used for developing cross-platform mobile apps. It aims to simplify both the development and the testing of such applications by providing a framework for client-side model–view–controller (MVC) and model–view–view-model (MVVM) architectures, along with components commonly used in rich Internet applications.

The upgrade to Angular 5 is an incremental one. This is because many of the changes are done invisibly.

However, some breaking changes have been included, so some developers will still have a lot of work to do. But for all the developers who kept their code bases up-to-date, the changes will be easy to handle this time.

The focus of Angular 5 was to make Angular faster again. The loading time has been improved by smaller bundles. The execution has been improved as well by optimizations at the compiler. For some projects, it is also important to note that the ng-upgrade is still in progress.

This allows AngularJS applications to be migrated smoothly to Angular and vice versa as Angular components can be embedded as downgrades in AngularJS applications.

Additionally, experimental technologies and features can be developed in a special lab space outside the Angular Framework. They can be evaluated and tested by developers at an early stage without negatively affecting the release planning of the framework itself. Angular 5 now officially supports TypeScript version 2.4. Previous versions of Angular have supported Type Script 2.3 without errors since release 4.3, including the Strict-Null-Check option.

Breaking changes in Angular 5:
The following APIs had already been marked as “deprecated” in Angular 4 and have been removed in Angular 5:

  • The Opaque Token has been removed, instead you have to use Injection Token now
  • The parameter constructor of the Error Handler has been removed.
  • ng Outlet Context has been removed from Ng Template Outlet.
  • The Angular Router takes as values only “enabled” and “disabled” for the parameter initialNavigation.
  • The values “true”, “false”, “legacy_enabled” and “legacy_disabled” are no longer accepted.
  • The ng-container element must now be used instead of i18n comments.
  • The compiler no longer uses the enable Legacy Template by default, since in Angular 4 the <template> element was deprecated and <ng-template> should be used instead. The <template> element and the enable Legacy Template option will be removed in Angular 6.
  • In favor of the new @angular/common/http module, the angular/http module has been marked as deprecated.
  • The Reflective Injector for dependency injection is now deprecated.

Depending on the project, the changes mentioned above may create some additionally effort. However, upgrading to Angular 5 should not evoke a disproportionate amount of effort.

The above mentioned is a brief about Angular 5 compiled from various sites. Watch this space for more updates on the latest trends in Technology.

 

Leave a Reply

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