Router Scroll Position Restoration:
remember and restore scroll position as the user navigates around an application.
RouterModule.forRoot(routes, {scrollPositionRestoration: 'enabled'})
ShadowDOM v1 View Encapsulation:
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.
@Component({ templateUrl: './my-component.html', encapsulation: ViewEncapsulation.ShadowDom }) export class MyComponent { }
keyvalue
Pipe:
@Component({ template: `<div *ngFor="let item of data | keyvalue"> {{item.key}} - {{item.value}} </div>` }) export class MyComponent { data = { "key": "value", "key2": "value2" }; }