[ Web Proxy ]
URL:
Viewing: https://angular.dev/api/common/NoTrailingSlashPathLocationStrategy [Back]  [Original]

NoTrailingSlashPathLocationStrategy Angular Skip to main content
menu
close
more_horiz
menuAPI
@angular/common

NoTrailingSlashPathLocationStrategy

Class
stable

A LocationStrategy that ensures URLs never have a trailing slash. This strategy only affects the URL written to the browser. Location.path() and Location.normalize() will continue to strip trailing slashes when reading the URL.

On this page

    arrow_upward_alt Back to the top

    API

        
          class NoTrailingSlashPathLocationStrategy extends PathLocationStrategy {  prepareExternalUrl(internal: string): string;  override onPopState(fn: LocationChangeListener): void;  override getBaseHref(): string;  override path(includeHash?: boolean): string;  override pushState(state: any, title: string, url: string, queryParams: string): void;  override replaceState(state: any, title: string, url: string, queryParams: string): void;  override forward(): void;  override back(): void;  override getState(): unknown;  override historyGo(relativePosition?: number): void;}
        
        

    prepareExternalUrl

    string
    @paraminternalstring
    @returnsstring

    onPopState

    void
    @returnsvoid

    getBaseHref

    string
    @returnsstring

    path

    string
    @paramincludeHashboolean
    @returnsstring

    pushState

    void
    @paramstateany
    @paramtitlestring
    @paramurlstring
    @paramqueryParamsstring
    @returnsvoid

    replaceState

    void
    @paramstateany
    @paramtitlestring
    @paramurlstring
    @paramqueryParamsstring
    @returnsvoid

    forward

    void
    @returnsvoid

    back

    void
    @returnsvoid

    getState

    unknown
    @returnsunknown

    historyGo

    void
    @paramrelativePositionnumber
    @returnsvoid
    Jump to details

    Web Proxy Viewer  |  New URL  |  Original Page