vendure-ecommerce / vendure

The commerce platform with customization in its DNA.
https://www.vendure.io
Other
5.62k stars 995 forks source link

enable anchor scrolling for angular router module #1459

Open simpian opened 2 years ago

simpian commented 2 years ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

If I have a url fragment, I would like angular to scroll to that specific section, but this has to be turned on in angular router module. http://localhost:3000/admin/extensions/common/test#1234 http://localhost:3000/admin/extensions/common/test#4567

https://angular.io/api/router/ExtraOptions#anchorScrolling e.g.

@NgModule({
    declarations: [],
    imports: [
        CommonModule,
        AppComponentModule,
        RouterModule.forRoot(routes, { useHash: false, relativeLinkResolution: 'legacy', **anchorScrolling: 'enabled'** }),
    ],
    providers: [],
    bootstrap: [AppComponent],
})
export class AppModule {}

can we add this in angular?

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

dlhck commented 1 week ago

Can be done together with #2903