PathUrlStrategy constructor Null safety

PathUrlStrategy(
  1. [PlatformLocation platformLocation = const BrowserPlatformLocation()]
)

Creates an instance of PathUrlStrategy.

The PlatformLocation parameter is useful for testing to mock out browser interactions.

Implementation

PathUrlStrategy([
  super.platformLocation,
])  : _basePath = stripTrailingSlash(extractPathname(checkBaseHref(
        platformLocation.getBaseHref(),
      )));