Since we are all happy to welcome the latest Angular 6 development release, some might make a wonder what’s so good about this new Angular version. We will relieve here: same way as it was with all previous releases, new release simplifies Angular makes it quicker and easier. It’s aimed to make developers life better.
TypeScript 2.7+ support in Angular 6 mobile development and web development
Angular 6 supports TypeScript 2.7 with such features as conditional type declarations, default declarations, as well as strict class initialization to make coding easier. Another good news is RXJS 6 support, that will make the size of your project package smaller!
Angular 6 Elements
The most expected and appealing to use Angular even to the most resistant to this amazing Framework feature is Angular Elements. It’s high time to get familiar with it and take advantage of it. It provides with an opportunity to use Angular components in different environments.
Angular components will be taken and wrapped within tailor-made elements.It will be supported by all recent browsers, though cross out Edge from the list. Now just imagine using it in some React app without full Angular environment. Doesn’t it sound incredible! That means that with Angular you can create your own component, with an opportunity to reuse it late in another HTML page.
What is Angular Stable Material with CDK
I assume we all had an experience with Angular Material 2 that was delivered in March 2016 and we all had this aftertaste like a library was quite raw yet. Now it is more stable and compatible with Angular 6.
Considerable part of Angular Material components are invented on basis of CDK Toolkit. This stable release CDK toolkit can be used by Developers to create custom elements consuming less time as this toolkit already includes the most frequently used utilities to create components.
Bazel Compiler
Bazel is commonly known because of using this software built by Google team. With latest Angular 6 version Angular community can have all benefits of using this open source tool as well so you can hire Angular developer. When you use Bazel to compile a build, you will recompile the whole code base, though it will be compiled only with necessary code. This tool involves fine-tuned local and distributed caching, optimized dependency analysis and parallel execution.
Addition of navigation Source and restored State to NavigationStart
Finally there will be an opportunity to find out if navigation happened compulsorily or through a location replace. Now navigation source can be determined through navigationSource. restoredState will supply the restored navigation that points to a present navigation. These two properties give us the opportunity to work with more than one use case in routing.
NgModelChange
Handler became more effective as currently an event happens once updates are applied to value and validity on its control.
Form Control statusChanges
Angular 6 fires ‘PENDING’ event in case when AbstractControl markAsPending is called.
Form pattern validators improvement
As it used to be with prior to Angular 6 version, when regular expression is going through custom validator it uses a validator pattern, and such patterns shouldn’t have contained anchors (^ and/or $). Otherwise, validation process will fail. Since now validators will work with settled line boundaries or without them.
Added multiple validators for array method of FormBuilder
Prior to Angular 6 version, impossible method of passing several validators to the formBuilder.array now is available.
New optional generic type ElementRef
This type allows to seize hold of the native element of Element as ElementRef Type.
Fresh updates of Angular CLI 1.7 that are adopted in Angular 6
Schematics
Schematics is aimed to make developers daily routine more efficient. This tool updates your project dependencies without any direct activity. Speaking about adjustments need to be done, just add them to staging without the changing a base. Those this new feature should be deeply researched before implementing as it can be too insidious.
ng update
Will update @angular/dependencies of CLI applications and it will happen automatically. Your product will updated to the latest stable version and contain all the core packages and devDependencies like rxjs, typescript in it.
Angular 6 Safety worker
Service worker is a commonly used Angular feature for data caching. Basically, it’s a loaded in user’s browser script called to improve loading time of application dramatically, also it’s useful for push alerts or network intercepting etc. Though it might be tricky when you try to remove it.
For such cases safety-worker.js has been added to the latest release. Deactivation of service worker will be real anytime now, especially when it comes to deploy.
App Budgets in last version of Angular
Almost any developer was dealing with requests to add more and more features to a product even though the initial project threshold was crossed long time ago. Up to now this process of app growing couldn’t be managed. Thanks to new App Budget feature in the Angular CLI setting edge for the size of packages is possible now. It will give an opportunity to configure error warnings when bundle size is approaches the limited boundary.
Ivy renderer in Angular 6
Ivy render (one of the most expected features that has been postponed till the next release) is an advanced rendering engine that aimed to improve an existing View Engine. It will help to make a final product lighter and faster. Angular developers can make Ivy renderer as a default manually in settings.
Conclusion
This article shed the light on the most relevant features of Angular 6. In fact, Angular 6 aims to make developers life better.Angular 6 supports TypeScript 2.7 with such features as conditional type declarations, default declarations, as well as strict class initialization to make coding easier. Another good news is RXJS 6 support, that will make the size of your project package smaller!
In case, you got left any questions or suggestions, feel free to contact us and we will assist you in any inquiry!