Angular version 6.1 has been released. This is replacement for version 6.0. As per official blog this is a minor release containing new features and bug fixes.
Key features
1. Router Scroll Position Restoration
For a developers it is now possible to configure the router to remember and restore scroll position as the user navigates around an application. This is possible by using the new navigation events which will reset the scroll position, and by pressing the back button it will restore the previous position.
How to turn on restoration in the router configuration?
RouterModule.forRoot(routes, {scrollPositionRestoration: 'enabled'})
In the official blog team have noted that, this feature will become the default in a future major release.
2. ShadowDOM v1 View Encapsulation
View Encapsulation is ways of connecting your CSS to the components they are defined within. Within the component decorator, we can now change the View Encapsulation to use ShadowDOM v1. Previously used ViewEncapsulation.Native
is now deprecated.
Better cross-browser support of ShadowDOM v1 used to built cross browsers shared standards. This support was not this much accurate in previous version. For better understanding of differences between v1 and v0.
Select the new encapsulation in your component’s decorator:
@Component({ templateUrl: './my-component.html', encapsulation: ViewEncapsulation.ShadowDom }) export class MyComponent { }
3. Schematics Chaining
The team have improved the way that we can chain Schematics by adding support for returning a Rule from an existing Rule. This allows us to more dynamically determine the set of rules to follow when designing Schematics.
4. TypeScript 2.9
Angular now supports TypeScript 2.8 and 2.9, in addition to 2.7.
Important change in TypeScript 2.9 will benefits the developers from the errors such as “Exported variable ‘x’ has or is using name ‘y’ from external module ‘z’ but cannot be named
”. We will not see this error and we will no longer have to change out code for such export patterns.
Summary
For the complete list of features and bug fixes please see the Angular changelog and the CLI release notes.
Click here to see articles related to Angular written by our Authors
I have healthy knowledge and experience in Azure, O365 and ASP.Net with c#, MVC, WebApi along with client-side frameworks and libraries like JavaScript, JQuery, KnockoutJs, AngularJs, Angular, ReactJs, NodeJs
1 comment
Nice article and contents which helps developer. if anybody want to Post questions for your difficulty, use stoodQ.com : Online Developers Community to post your question and get answers by an experts. Also earn credit with many option and monthly amazon gift card.