Spec-Zone.ru › Angular

withHashLocation

Provides the location strategy that uses the URL fragment instead of the history API.

provideRouterHashLocationStrategy

API

function withHashLocation(): RouterHashLocationFeature;
@returnsRouterHashLocationFeature

A set of providers for use with provideRouter.

Usage Notes

Basic example of how you can use the hash location option:

const appRoutes: Routes = [];
bootstrapApplication(AppComponent,
  {
    providers: [
      provideRouter(appRoutes, withHashLocation())
    ]
  }
);

Super-powered by Google ©2010–2025.
Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0.
https://angular.dev/api/router/withHashLocation

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API