Angular 7.0: What to Expect from This Version?2018-12-14T11:46:00.000Z 2018-12-14T11:46:00.000Z Angular development team concentrated on the Ivy project by recoding the compiler as well as the runtime code in order to make it more compact, improved and swifter.
Pssst: are you sure you're reading the article you were looking for? Angular 9.0.0 is about to be launched and we've compiled the new features and bug fixes in another article. Read it here.
Long-awaited Angular 7 has already become available.
Basically, despite the expectations, the seventh version of Angular doesn’t contain many new features since the Angular development team concentrated more on the Ivy project by recoding the compiler as well as the runtime code in order to make it more compact, improved and swifter. However, the Ivy hasn’t been completed for release yet.
Therefore, Angular 7.0 won’t suggest you lots of glossy characteristics, and, consequently, it won’t take too much time for you to migrate to the new edition.
TypeScript 3.1 is now being supported
One of the most distinctive characteristics of Angular 7.0 is the support of TypeScript 3.1 being also the most recent version. In fact, it is obligatory to upgrade to TypeScript 3.1 to use Angular 7.0. Normally Angular goes behind a few versions; that’s why this is a pleasant option to be able to deploy the latest release of TypeScript for a change. Earlier, you might be able to figure out all the elements and functions of TypeScript 3.0, so now you have something to compare with.
Compilation options in Angular 7
You are well aware that you are able to determine compiler optionscompilerOptions for TypeScript as well as angularCompilerOptions for Angular in the tsconfig.json files.
TypeScript provides the possibility to amplify the compilerOptions of the different files, but it didn’t help to do the same with the Angular compiler options. Now the Angular compiler is fixated, and it is possible to determine compiler options of Angular in a base config and then to amplify them in a different file. Besides, the options will be combined with the option determined in the deriving config file since they are intended for TypeScript compiler options.
Advance of Ivy
The rewrite is making much headway, but Ivy is not ready to be deployed in this version yet. Still, you may check the official feature tracking service, and you may convince yourself that a huge portion of work has been already done. Nevertheless, there’s still a long haul ahead before it will be complete for full-scale use.
Ivy comprises several fragments:
- ngcc: this is an instrument that analyzes all the relations that are available and transforms the present code into the code compatible with Ivy. Anyhow, it is a pretty crude feature with rather poor experience of its practical implementation;
- This is the actual renderer which collects created code and performs a miraculous trick within program run-time. Yet, lots of work remains to be done in order to obtain a full improved version.
One more section that is anticipated impatiently is the support of “runtime in18n”. The integration procedures have been launched recently. Therefore, these works have a long way to go.
Indeed, some experts have already made a trial use of Ivy, but all of them recognized that it is not ready for regular operation. As Google reports, the Angular team needs several months more to transfer a vast range of projects in order to get comments and to repair the problems.
In fact, anyone is able to check it since the CLF has just issued a test Ivy flag to produce the app with the arrangement that has to be explored.
Obviously, right now, the Angular team is making more modifications that will supplement the entire environment of the product.
Slots comprising Angular Elements
ViewEncapsulation.ShadowDom has been available for use since the release of Angular 6.1 that is a huge advantage for Angular Elements (the components of Angular, which are wrapped as Web elements to enable using each of them separately). However, the previous versions were lacking the possibility to use <slot>, a novel basic HTML component presented by the Web Component Specification. In Angular 7, this option has become enabled.
One more feature that has appeared in Angular 7 is alerting when you launch positioning beyond the margins of the Angular area. Since you can’t do that, Angular issues a notification. However, this warning is present just in a development condition. Indeed, it doesn’t happen too often, for instance, when attempting to reallot the users in case of error detected in the app via enabling custom ErrorHandler because the ErrorHandler will operate beyond the limits of the zone in order to evade possible continuous cycle.
Unfortunately, this feature allows warning issuance during the tests when deployment the router, but in Angular itself, such notification can be hardly found.
Regarding other issues that haven’t been solved in Angular 7, one more lacking option is a rewrite of a router for the deployment of a unitary Observable behind the scene that will routinely annul the previous positioning. Probably, you won’t feel that, but it has to be repaired in order to allow numerous navigations to be launched at the same time and to enable more features down the line.
It often happens to the principle releases that some features become obsolete. For example, you can’t use <ngForm> anymore to declare the form in a template because this function has already become obsolete. Instead, you have to use <ng-form>.
Inference should be drawn that Angular 7 comprises several amazing features, but at the same time, Ivy is making much headway. Therefore, we may expect the Angular 8 to be more awesome. In the meanwhile, it won’t take too much time and efforts to upgrade your apps.