fix(router): default scroll position restoration to disabled (#25586)

Fixes #25145
FW-305 #resolve

PR Close #25586
This commit is contained in:
Jason Aden
2018-08-20 12:03:51 -07:00
parent f54f3856cb
commit fc89479044
2 changed files with 23 additions and 1 deletions

View File

@ -29,7 +29,11 @@ export class RouterScroller implements OnDestroy {
/** @docsNotRequired */ public readonly viewportScroller: ViewportScroller, private options: {
scrollPositionRestoration?: 'disabled' | 'enabled' | 'top',
anchorScrolling?: 'disabled'|'enabled'
} = {}) {}
} = {}) {
// Default both options to 'disabled'
options.scrollPositionRestoration = options.scrollPositionRestoration || 'disabled';
options.anchorScrolling = options.anchorScrolling || 'disabled';
}
init(): void {
// we want to disable the automatic scrolling because having two places