Angular version 6.1 has been released. This is a minor release that is a drop-in replacement for 6.0 containing new features and bugfixes.

picture of the Angular repository changelog

What’s new?

Router Scroll Position Restoration

Developers can now configure the router to remember and restore scroll position as the user navigates around an application. New navigation events will reset the scroll position, and pressing the back button will restore the previous position.

Turn on restoration in the router configuration:

RouterModule.forRoot(routes, {scrollPositionRestoration: 'enabled'})

It is expected that this will become the default in a future major release.

ShadowDOM v1 View Encapsulation

There are multiple ways of connecting your CSS to the components they are defined within, we call this View Encapsulation. Within your component decorator, you can now change the View Encapsulation to use ShadowDOM v1. The previous ViewEncapsulation.Native is now deprecated.

ShadowDOM v1 has better cross-browser support than the previous version, and is being built as a shared standard across browsers.

Many of these changes apply more to library authors and advanced developers, but you can learn more about the differences between v1 and v0. ShadowDOM v1 is necessary for content projection with Angular Elements.

Select the new encapsulation in your component’s decorator:

keyvalue Pipe

It is now possible to pipe an Object through the keyvalue pipe, which will give you an array suitable for use within an *ngFor.

Schematics Chaining

We’ve improved the way that you can chain Schematics by adding support for returning a Rule from an existing Rule. This allows developers to more dynamically determine the set of rules to follow when designing Schematics.

TypeScript 2.9

Angular now supports TypeScript 2.8 and 2.9, in addition to 2.7.