docs(router): make InitialNavigation
part of the public API (#32707)
`InitialNavigation` is used in `ExtraOptions`, which is already part of the public API. Thus, `InitialNavigation` should be too. Not publicly exporting it from `router/index.ts` seems an omission, since the type is already annotated with the `@publicApi` JSDoc tag. By publicly exporting `InitialNavigation`, it will also correctly appear in the API docs on angular.io. PR Close #32707
This commit is contained in:
@ -327,24 +327,24 @@ export interface ExtraOptions {
|
||||
*
|
||||
* ```typescript
|
||||
* class AppModule {
|
||||
* constructor(router: Router, viewportScroller: ViewportScroller) {
|
||||
* router.events.pipe(
|
||||
* filter((e: Event): e is Scroll => e instanceof Scroll)
|
||||
* ).subscribe(e => {
|
||||
* if (e.position) {
|
||||
* // backward navigation
|
||||
* viewportScroller.scrollToPosition(e.position);
|
||||
* } else if (e.anchor) {
|
||||
* // anchor navigation
|
||||
* viewportScroller.scrollToAnchor(e.anchor);
|
||||
* } else {
|
||||
* // forward navigation
|
||||
* viewportScroller.scrollToPosition([0, 0]);
|
||||
* }
|
||||
* });
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
* constructor(router: Router, viewportScroller: ViewportScroller) {
|
||||
* router.events.pipe(
|
||||
* filter((e: Event): e is Scroll => e instanceof Scroll)
|
||||
* ).subscribe(e => {
|
||||
* if (e.position) {
|
||||
* // backward navigation
|
||||
* viewportScroller.scrollToPosition(e.position);
|
||||
* } else if (e.anchor) {
|
||||
* // anchor navigation
|
||||
* viewportScroller.scrollToAnchor(e.anchor);
|
||||
* } else {
|
||||
* // forward navigation
|
||||
* viewportScroller.scrollToPosition([0, 0]);
|
||||
* }
|
||||
* });
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
scrollPositionRestoration?: 'disabled'|'enabled'|'top';
|
||||
|
||||
|
Reference in New Issue
Block a user