PathLocationStrategy constructor

PathLocationStrategy(
  1. PlatformLocation _platformLocation, [
  2. @Optional.new() @Inject.new(appBaseHref) String? href
])

Implementation

PathLocationStrategy(
  this._platformLocation, [
  @Optional() @Inject(appBaseHref) String? href,
]) {
  href ??= _platformLocation.getBaseHrefFromDOM();
  if (href == null) {
    throw ArgumentError('No base href set. Please provide a value for the '
        'appBaseHref token or add a base element to the document.');
  }
  _baseHref = href;
}