GitHub

DaffRoutingUriNormalizer

Processes URIs to remove extraneous Angular-specific information.

import { DaffRoutingUriNormalizer } from '@daffodil/core/routing'
@Injectable()
class DaffRoutingUriNormalizer {
  normalize(
    uri: string
    outlet: string = PRIMARY_OUTLET
  ): string
}

Properties

Name Type Description
normalize string

Normalizes an Angular router path into a useable URI. e.g. normalize('some/url.html(secondary:outlet)?query=param#fragment') -> 'some/url.html?query=param#fragment'

Optionally accepts an outlet to target. e.g. normalize('some/url.html(secondary:outlet)?query=param#fragment', 'secondary') -> 'outlet?query=param#fragment'