Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

withInMemoryScrolling seems to be ignored by provideFileRouter #1592

Open
1 of 2 tasks
mparpaillon opened this issue Feb 3, 2025 · 0 comments
Open
1 of 2 tasks

withInMemoryScrolling seems to be ignored by provideFileRouter #1592

mparpaillon opened this issue Feb 3, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@mparpaillon
Copy link

Please provide the environment you discovered this bug in.

Dependencies

"@analogjs/content": "^1.10.2-beta.8",
"@analogjs/router": "^1.10.2-beta.8",
"@analogjs/trpc": "0.3.0",
"@angular-magic/ngx-gp-autocomplete": "^2.0.2",
"@angular/animations": "^19.1.0",
"@angular/cdk": "^19.1.0",
"@angular/common": "^19.1.0",
"@angular/compiler": "^19.1.0",
"@angular/core": "^19.1.0",
"@angular/forms": "^19.1.0",
"@angular/platform-browser": "^19.1.0",
"@angular/platform-browser-dynamic": "^19.1.0",
"@angular/platform-server": "^19.1.0",
"@angular/router": "^19.1.0",
"@contentful/rich-text-html-renderer": "^16.6.10",
"@googlemaps/js-api-loader": "^1.16.8",
"@primeng/themes": "^18.0.0",
"@rx-angular/cdk": "^19.0.1",
"@sentry/angular": "^8.47.0",
"@sentry/cli": "^2.39.1",
"@supabase/supabase-js": "^2.44.4",
"@trpc/client": "^10.45.2",
"@trpc/server": "^10.45.2",
"postgres": "^3.4.4",
"rxjs": "^7.8.1",
"rxjs-zone-less": "^1.0.0",
"tslib": "^2.6.3",

Which area/package is the issue in?

router

Description

I'm trying to use the withInMemoryScrolling config to prevent the scroll position memory (default in Angular) but adding withInMemoryScrolling() to the provideFileRouter function doesn't seem to do anything.

export const appConfig: ApplicationConfig = {
  providers: [
    // ....
    provideFileRouter(
      withComponentInputBinding(),
      withInMemoryScrolling({
        anchorScrolling: "enabled",
        scrollPositionRestoration: "top",
      }),
    ),
    // ...
  }
}

Basically I just want the view to scroll to the top by default

Please provide the exception or error you saw


Other information

No response

I would be willing to submit a PR to fix this issue

  • Yes
  • No
@mparpaillon mparpaillon added the bug Something isn't working label Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant