PathUrlStrategy constructor

PathUrlStrategy([
  1. PlatformLocation platformLocation = const BrowserPlatformLocation(),
  2. bool includeHash = false
])

Creates an instance of PathUrlStrategy.

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

Implementation

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