We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 43f33ed commit 250fcc4Copy full SHA for 250fcc4
material.angular.io/src/app/shared/table-of-contents/table-of-contents.ts
@@ -58,7 +58,11 @@ export class TableOfContents implements OnInit {
58
59
this._fragmentSubscription = this._route.fragment.subscribe(fragment => {
60
this._urlFragment = fragment;
61
- this.updateScrollPosition();
+
62
+ const target = document.getElementById(this._urlFragment);
63
+ if (target) {
64
+ target.scrollIntoView();
65
+ }
66
});
67
}
68
0 commit comments