function
Provides the location strategy that uses the URL fragment instead of the history API.
withHashLocation(): RouterConfigurationFeature
There are no parameters.
RouterConfigurationFeature
: A set of providers for use with provideRouter
.
Basic example of how you can use the hash location option:
const appRoutes: Routes = []; bootstrapApplication(AppComponent, { providers: [ provideRouter(appRoutes, withHashLocation()) ] } );
© 2010–2023 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://angular.io/api/router/withHashLocation