• 개요
@angular/router

withHashLocation

함수
안정화

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

API

@returnsRouterHashLocationFeature

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())
    ]
  }
);
상세 내용으로 이동