A quick updates summary of the new Angular 6 release.
It has many exciting feature updates and a huge performance boost!
The key updates are Angular Elements, Angular library, Service worker improvements, and many more.
I use Angular every day, so let’s just get started with the groundbreaking changes that can make our life easier.
The super awesome feature that my team was waiting for, Angular Element is primarily designed to use the Angular Component as a Web Component. Which can be used on any HTML page (not just in the Angular app), isn’t it exciting…!
Just imagine that your ColdFusion teammate can also use your handmade Angular component in his application without having Angular ecosystem in-place. I am super excited to use it and it can be done easily with just a few efforts. Have a look at this post to know more about Angular Elements.
New Angular CLI commands
It’ll automatically update your @angular dependencies in the package.json file. It updates npm dependencies, it also updates your code if there are any breaking changes or deprecation found.
If you’ve planned to upgrade from Angular 4.x or 5.x to 6.x you’ll use it and see what it does.
ng add package-name
It will add a new capability to your project. It not only downloads and installs a new package to your project but along with that it also invokes an installation script which can update your code with configuration changes, add additional dependencies if required. It helps you to keep your packages up-to-date.
CLI v6 now supports workspaces that simply means that you can have multiple projects or libraries in the same project configuration file. It’ll now use angular.json file instead of .angular-cli.json. It’ll be automatically renamed when you upgrade!
You can read more about CLI workspaces here.
Support for Library
It is a great feature that allows you to create and build your own library. The library is your custom npm package that you can use internally or publish it to npm.
Angular generator supports the library generation using the command ng g library your-awesome-library.
You must build the library in order to use it. Have a look at this link to know more about the Angular library.
Using Angular 6,
- You will be able to use your Angular component in any HTML web application.
- You will notice a significant performance improvement.
- You will be able to create your own Angular library and publish it!
That’s not all, there are many other feature and performance improvements rolled out in the Angular 6 and I’m still exploring it.
Check this out to upgrade your project to Angular 6.
Personally, I’m super excited to use it because it is making things simpler than ever before.
Happy coding, stay awesome!